[postgis-users] sequence build

jj.wag at gmx.de jj.wag at gmx.de
Thu Jul 17 02:33:16 PDT 2008


Hi all,

I'm using this command to import different Shape-files into a new 
POSTGIS-table:

shp2pgsql -s 31466 -W Latin1 -I rov_sgdn rov_sgdn | psql -U postgres -d mydb

for some tables a sequence is automaticlly created on my gid:

CREATE SEQUENCE rov_sgdn_gid_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 26
  CACHE 1;
ALTER TABLE rov_sgdn_gid_seq OWNER TO postgres;

For some tables this gid is not created, and I have to create it by hand.
Two questions:
1. Why is for some shapes a sequence created and for some not?
2. Is it possible to build it for each new table with the shp2pgsql - 
command?

Thanks
Jo 




More information about the postgis-users mailing list