[postgis-devel] Registering geometry columns
Kevin Neufeld
kneufeld at refractions.net
Fri May 29 10:06:41 PDT 2009
Thinking about the recent question on users, I think Piotr was just confused about the functionality of
AddGeometryColumn. I think he was looking for something that would simply register (or add) his view with
geometry_columns ... which got me thinking that there really isn't a clear way for users to register/deregister their
tables tables/views with PostGIS.
Sure we have DropGeometryColumn and friends, but these will actually drop the geometry column or table ... not just
remove a row or two from the geometry_columns table.
If a user wants to register a view with PostGIS, do they really need to know the internal make up of geometry_columns
and manually insert and delete rows from the PostGIS metadata?
Populate_Geometry_Columns(oid) that I wrote a while ago does abstract the registering bit for either tables or views,
but there is nothing available to deregister a table or view.
Would it make sense to add a few new management functions to PostGIS?
RegisterRelation(oid)
RegisterColumn(rel oid, column oid)
DeRegisterRelation(oid) or UnRegisterRelation
DeRegisterColumn(rel oid, column oid)
Well, those could be the implementation functions that we can wrap with any number of possible APIs...
RegisterTable(tablename text)
RegisterTable(schema text, tablename text)
RegisterView(tablename text)
RegisterView(schema text, tablename text)
RegisterGeometryColumn(relname text, columnname text)
RegisterGeometryColumn(schemaname text, relname text, columnname text)
DeRegister...
Am I thinking too ESRI-ish? PostGIS is supposed to be easy to use. Does this make thing more clear or does it muddy
the waters?
-- Kevin
More information about the postgis-devel
mailing list