[postgis-devel] Registering geometry columns
Paul Ramsey
pramsey at cleverelephant.ca
Fri May 29 10:16:03 PDT 2009
We have so so many geometry_columns management functions now. How
about one function to rule them all. No arguments, it just
(a) goes through geometry columns and makes sure every entry in fact exists
(b) goes through the system tables and inserts every possible geometry
column, both views and tables
That's my dream.
P
On Fri, May 29, 2009 at 10:06 AM, Kevin Neufeld
<kneufeld at refractions.net> wrote:
> 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
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
More information about the postgis-devel
mailing list