[Geoserver-devel] [JIRA] (GEOS-10796) TaskManager CopyTable produces PSQLException zero-length delimiter

Stijn Goedertier created an issue

GeoServer / BugGEOS-10796

TaskManager CopyTable produces PSQLException zero-length delimiter

Issue Type:

BugBug

Assignee:

Unassigned

Created:

16/Dec/22 12:07 PM

Environment:

We use the TaskManager CopyTable task to update postgres tables from a source database.

This works well on most of our tables, but for some the copying fails with this error:

org.postgresql.util.PSQLException: ERROR: zero-length delimited identifier at or near """" Position

This is caused by the fact that the source table contains columns that have been dropped.

In the logs of postgres we find the following error:

ERROR: zero-length delimited identifier at or near """" at character 68
Statement: CREATE TABLE "public"."_temp_27cb54af_cc35_491a_8236_b2f4e258685a" ( "".""."".""."".""."".""."pg"."dropped"."1" - NULL, "id" bigint, "geom" geometry(MultiPolygon,31370) NULL, "id" bigint NOT NULL, PRIMARY KEY("id") ) 

It shows that TaskManager CopyTable tries to create a table with a “dropped” column.

This information indeed occurs in the postgres pg_attribute metadata.

SELECT a.attname, a.attisdropped, c.relname  FROM pg_attribute a LEFT JOIN pg_class c ON (a.attrelid = c.oid)
WHERE c.relname = 'mytable'

           attname            | attisdropped |    relname     
------------------------------+--------------+----------------
 id                           | f            | mytable
 ........pg.dropped.1........ | t            | mytable
 another attribute            | f            | mytable
 ...

(21 rows)

Priority:

MediumMedium

Reporter:

Stijn Goedertier

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100212-sha1:e2fc486)

Atlassian logo