[PostGIS] #2623: pgsql2shp creates a dbf with 0 records when the table only has a geometry column

PostGIS trac at osgeo.org
Sun Jun 21 10:58:37 PDT 2026


#2623: pgsql2shp creates a dbf  with 0 records when the table only has a geometry
column
----------------------------------+-----------------------------
  Reporter:  winkey               |      Owner:  robe
      Type:  defect               |     Status:  closed
  Priority:  medium               |  Milestone:  PostGIS Fund Me
 Component:  utils/loader-dumper  |    Version:  2.0.x
Resolution:  fixed                |   Keywords:
----------------------------------+-----------------------------
Changes (by Darafei Praliaskouski <me@…>):

 * resolution:   => fixed
 * status:  new => closed

Comment:

 In [changeset:"c4bae99fc25aabfc512dd0c14f1474b66b3e7730/git"
 c4bae99f/git]:
 {{{#!CommitTicketReference repository="git"
 revision="c4bae99fc25aabfc512dd0c14f1474b66b3e7730"
 Generate pgsql2shp DBF id for geometry-only dumps

 When pgsql2shp exports a result with a geometry or geography column but no
 DBF attributes, add a generated integer GID field and populate it for each
 output record so the DBF record count remains aligned with the SHP
 records.

 Propagate the generated-field warning to callers and guard dumper state
 allocation failures in the CLI and GUI paths.

 Closes #2623

 Closes https://github.com/postgis/postgis/pull/1019
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/2623#comment:10>
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