[postgis-users] shp2pgsql and schemas
strk at keybit.net
Tue Dec 16 00:11:37 PST 2003
Changing the AddGeometryColumn will break compatibility with
dumps created by old installations. It might be wiser to
have a polyphormic function with a different number of args
for schema-aware behaviours.
Moreover since now the f_table_schema column is filled with
the wrong value we might require a call to fix_geometry_columns
making it also cleanup those values when having the same value
of the database name. On the other hand, this could do the wrong
thing if somebody is using the schema-aware version with schemas
that are *really* named as the database.
Yet another possibility is adding a new column to specify wheter
or not we are dealing with schema-aware records. Old records will
have a 'null' value in this new column, while new one will have
something. Note that this will require loading an "postgis_upgrade.sql"
script to enlarge the geometry_columns definition.
What do users think about these options ?
> The geometry_columns table actually looks like:
> CREATE TABLE geometry_columns (
> f_table_catalog varchar(256) not null,
> f_table_schema varchar(256) not null,
> f_table_name varchar(256) not null,
> f_geometry_column varchar(256) not null,
> coord_dimension integer not null,
> srid integer not null,
> type varchar(30) not null
> So just change the AddGeometryColumn() so that it matches the
> geometry_column table.
> When the original AddGeometryColumn() was written there were no schema
> or catalogs in postgresql. I used the database name for the schema.
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users