error message when renaming a table

38 views
Skip to first unread message

Antonio Valanzano

unread,
Sep 13, 2021, 2:51:53 AM9/13/21
to SpatiaLite Users
errore.JPG
Dear List,
I have tried to rename a table using the usual SQL command but I always receive an error message (see the screenshot).

This situation happens with the new version di Spatialite (test-2021-June-win64)
but not with the previous version (stable-2020-August-win64).

Has someone experienced the same situation ?

Antonio Valanzano

a.fu...@lqt.it

unread,
Sep 13, 2021, 3:44:12 AM9/13/21
to spatiali...@googlegroups.com
On Sun, 12 Sep 2021 23:51:53 -0700 (PDT), Antonio Valanzano wrote:
> Dear List,
> I have tried to rename a table using the usual SQL command but I
> always receive an error message (see the screenshot).
>
> This situation happens with the new version di Spatialite
> (test-2021-June-win64)
> but not with the previous version (stable-2020-August-win64).
>
> Has someone experienced the same situation ?
>

Hi Antonio,

it's a well known problem, and a patch definetely resolving this
issue has alread been committed into the Fossil repository

please see:
https://groups.google.com/g/spatialite-users/c/SnNZt4AGm_o/m/VS-jVl9bDAAJ

very quick summary: the bug was caused by a subtle change
introduced by very recent versions of SQLite

bye Sandro

Antonio Valanzano

unread,
Sep 13, 2021, 4:07:01 AM9/13/21
to SpatiaLite Users
So using the GUI and
not having the possibility of recompiling the library using the " -DSQLITE_ALLOW_ROWID_IN_VIEW compile-time option "
the only solution seems to be:

1. to "clone"  the table into a new table
2. to remove the old table.


Antonio

a.fu...@lqt.it

unread,
Sep 13, 2021, 5:33:54 AM9/13/21
to spatiali...@googlegroups.com
On Mon, 13 Sep 2021 01:07:01 -0700 (PDT), Antonio Valanzano wrote:
> So using the GUI and
> not having the possibility of recompiling the library using the "
> -DSQLITE_ALLOW_ROWID_IN_VIEW compile-time option "
> the only solution seems to be:
>
> 1. to "clone" the table into a new table
>
> 2. to remove the old table.
>

there is a simplest workaround. just execute:

DROP TRIGGER ISO_metadata_reference_row_id_value_insert;
DROP TRIGGER ISO_metadata_reference_row_id_value_update;

the issue is caused by an incorrect SQL statement in these
two triggers; if you are not currently using the ISO matadata
module (as I presume) removing both triggers is completerly
harmless and will definitively resolve this annoying issue.

bye Sandro
Reply all
Reply to author
Forward
0 new messages