[postgis-users] Getting GID value from an Insert query

Bruce Rindahl rindahl at lrcwe.com
Thu May 25 10:13:48 PDT 2006


This is probably a straight SQL issue but hopefully someone can help.
I am running an insert query into a PostGIS/PostgeSql database.  The query
runs fine into a table with a unique GID value.  I then need to get that row
id back to display in a web display.  How can I get the GID from the insert
query I just ran?

The query is:

insert into dwr_gis (the_geom) values (GeomFromText('POLYGON((-2.29
1510.00,-1586.66 1851.53,.....,-2.29 1510.00))',26913))

and the result is:

Query returned successfully: 1 rows affected, 47 ms execution time.

Thanks!
Bruce Rindahl




More information about the postgis-users mailing list