Opened 5 years ago

Closed 5 years ago

#2907 closed defect (invalid)

PGDump: promote DROP_TABLE=IF_EXISTS as default

Reported by: Mike Taves Owned by: pramsey
Priority: medium Milestone:
Component: postgis Version: 2.1.x
Keywords: Cc:

Description

This behaviour change suggested is for the PGDump OGR driver. Currently (version 1.11.0), without any layer creation options, the resulting file can only be loaded into a PostgreSQL database if the table already exists. If it is a new table, the message from psql is:

psql:pgdump.sql:2: ERROR: table "pgdump" does not exist

Which was caused by the command on line 2:

DROP TABLE "public"."pgdump" CASCADE;

However, with layer creation DROP_TABLE=IF_EXISTS, it works. This should be the default option.

This option exists because the DROP TABLE [ IF EXISTS ] syntax was introduced with PostgreSQL 8.2, which was released in 2006-12-05 and supported until 2011-09-26. PostgreSQL versions that don't support the IF EXISTS syntax are no longer community supported.

Change History (1)

comment:1 Changed 5 years ago by Mike Taves

Resolution: invalid
Status: newclosed

Opps, this is a GDAL ticket

Note: See TracTickets for help on using tickets.