[postgis-tickets] [PostGIS] #2907: PGDump: promote DROP_TABLE=IF_EXISTS as default
PostGIS
trac at osgeo.org
Mon Aug 25 14:58:38 PDT 2014
#2907: PGDump: promote DROP_TABLE=IF_EXISTS as default
---------------------+------------------------------------------------------
Reporter: mwtoews | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: 2.1.x
Keywords: |
---------------------+------------------------------------------------------
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.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2907>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list