[postgis-users] create tables smarter

Lee Hachadoorian lee.hachadoorian at gmail.com
Wed Jun 4 08:10:18 PDT 2008


AddGeometryColumn does two things: it adds a column of type geometry,
and it adds a row to table geometry_columns.  If I understand what it
is you want to do, you can do the SELECT and then add the row to
geometry_columns with an INSERT statement:

INSERT INTO public.geometry_columns
VALUES ('',<schema_name>,<table_name>,<column_name>,<dimension>,<srid>,<type>);

where the arguments use the same values you would use for the
AddGeometryColumn function.

Stephen, I don't see anything about a probegeometrycolumns( ) function
in the PostGIS docs.  Can you point me in the right direction?

Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center

More information about the postgis-users mailing list