[postgis-users] Documentation lacking & AddGeometryColumn sch ema_name vs db_name

Boyce, Greg GBoyce at NRCan.gc.ca
Wed Jul 21 13:50:50 PDT 2004


Hmm, regarding #6 belown, must have been doing something wrong.  
It drops the geometry column now, though I still get the weird Notice
for both Add and Drop commands.

G. Boyce

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
> Boyce, Greg
> Sent: July 21, 2004 3:47 PM
> To: 'PostGIS Users Discussion'
> Subject: [postgis-users] Documentation lacking & AddGeometryColumn
> schema_name vs db_name
> 
> 
> And if I might add, the documentation has problems, and is skimpy
> in many areas:
> 
> 1 What version of PostGIS does the online docs correspond to?
> 
> 2 There's no search function in the online docs
> 
> 3 There are very few or no examples in the "OpenGIS Functions"
>   and "Other Functions" sections.
> 
> 4 The OpenGIS function, SetSRID, is missing the SRID in the 
>   definition.
> 
> 5 Conflicting information on the AddGeometryColumn function.  Is
>   it <db_name> or <schema_name>?
>   Chapter 4. Creating a spatial table:
> 	http://postgis.refractions.net/docs/x321.html#AEN391
>   says 
> 	AddGeometryColumn(<db_name>, <table_name>, <column_name>, ...
> 	SELECT AddGeometryColumn('roads_db', 'roads_geom', 'geom', ...
> 
>   Yet in Chapter 5. -- OpenGIS Functions:
> 	http://postgis.refractions.net/docs/c673.html
>   it says
> 	AddGeometryColumn(<schema_name>, <table_name>, 
> <column_name>, ...
>   (What do mean by saying that schema_name is a table schema?)
> 
>   The example given in the recent MUM presentation on Mapserver & 
>   PostGIS uses [dbname].
> 
> 6 I've a database called "magdb".  I add the geometry column:
> 	SELECT AddGeometryColumn('magdb', 'surveys2', 'boundary', -1,
> 'POLYGON', 2);
>   and it gives an Notice message:
> 	NOTICE:  Invalid schema name - using current_schema()
> 	CONTEXT:  PL/pgSQL function "addgeometrycolumn" line 4 at select
> into variables
>                 addgeometrycolumn
> 
>   The geometry_columns table contains (note the "public" not "magdb"):
> 	 f_table_catalog | f_table_schema | f_table_name | 
> f_geometry_column
> | coord_dimension | srid |  type   | attrelid | varattnum | stats 
> -----------------+----------------+--------------+------------
> -------+------
> -----------+------+---------+----------+-----------+-------
>                  | public         | surveys2     | boundary          |
> 2 |   -1 | POLYGON |   299809 |         3 | 
> 
>   A DropGeometryColumn on "magdb" of course doesn't work!
> 	SELECT DropGeometryColumn('magdb', 'surveys', 'boundary27');
> 
>   What's wrong?  (I'm using PostgreSQL 7.4.3 and PostGIS 0.8.2)
> 
> 
> Many thanks,
> Greg Boyce
> ___________________________________________________
> Regional Geophysics section    /   Section de la géophysique régionale
> Geological Survey of Canada    /   Commission Géologique du Canada
> Natural Resources Canada       /   Ressources naturelles Canada
> Government of Canada           /   Gouvernement du Canada



More information about the postgis-users mailing list