[postgis-users] shp2pgsql and schemas
Paul Ramsey
pramsey at refractions.net
Fri Jul 4 08:55:34 PDT 2003
Right now, shp2pgsql fills out the 'schema' column of geometry_columns
with the name of the database the data is being loaded into. I think
there is also a check in the AddGeometryColumns function to ensure that
the value being put into that column is "correct". This is because there
was no such thing as a "schema" when these things were written, so we
superimposed the pgsql 'database' concept as the 'schema'.
Now that schemas actually *exist* in pgsql, our behavior is in wrong.
The schema idea can be literally and correctly translated into pgsql
terms. So AddGeometryColumn should be dumbed down to just
AddGeometryColumn( <tablename>, <columnname>, <srid>, <type>, <dim> )
Because the schema of the table is discoverable. The fact that 'schema'
is part of geometry_columns is also in implicit guide to where the
postgis functions and tables should be installed -- somewhere public and
not data specific. The currect default of installing in the 'public'
schema seems like a good default to retain.
Basically, both shp2pgsql and AddGeometryColumn need to be reworked and
tested in the context of schemas.
P.
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list