[postgis-users] shp2pgsql Primary Key
Chris G. Nicholas
cgn at globexplorer.com
Fri Feb 14 20:49:43 PST 2003
It might be interesting to have a basic trigger mechanism for inserts and deletes; i.e. before eating up a new sequence id for a given table, perhaps one might look in a "gid recycle bin." pros: better number management; cons: more overhead, and ane would have to accept the basic premise of transient identifiers, just like phone numbers..
From: Jeff Lounsbury [mailto:jeffloun at refractions.net]
Sent: Fri 2/14/2003 4:33 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] shp2pgsql Primary Key
There has been a request to make the 'gid' column in the table shp2pgsql
creates into the primary key. The issue with this is that it takes a
little more thinking to try to avoid duplicating the gid when you append
data to that table after you create it.
My only idea at this point is to add a 'create sequence ...' line into
the program when run in table creation mode and then use the next value
of the sequence all the time. Seems like a decent idea to me until i
realized I would be instantly ruining everyone's life who ever wants to
use the new shp2pgsql program with an old table created by the previous
shp2pgsql (because the next value statement would look for a seq that
What do people think? Would it really really suck if you couldn't append
to old tables with the new version or does nobody ever do that anyways?
postgis-users mailing list
postgis-users at postgis.refractions.net
More information about the postgis-users