[postgis-users] schema name for a temp table?

Burgholzer,Robert rwburgholzer at deq.virginia.gov
Tue Aug 26 10:25:08 PDT 2008


OK,

So, what advantage is conferred by the use of the geometry_columns
table? 

 

Robert W. Burgholzer

Surface Water Modeler

Office of Water Supply and Planning

Virginia Department of Environmental Quality

rwburgholzer at deq.virginia.gov

804-698-4405

Open Source Modeling Tools:

http://sourceforge.net/projects/npsource/

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
David William Bitner
Sent: Tuesday, August 26, 2008 9:55 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] schema name for a temp table?

 

Nope, you don't have to use addgeometrycolumn at all.  You just need to
create a table with a column declared as geometry.

Create table foo (my_geom_column geometry, my_id serial, my_attribute
varchar);

On Tue, Aug 26, 2008 at 8:20 AM, Burgholzer,Robert
<rwburgholzer at deq.virginia.gov> wrote:

Kevin,
Thanks for the response.  By spatially enabled, I mean, has a geometry
column, and I wish to use that column for comparison operators, such as
st_within().  Furthermore, since I am adding the column to a table of
data, then setting the geom column to table lat/lon values, I needed to
use addgeometrycolumn (at least I think that I need to do that).

Anyhow, your query gives me just the information that I need.  Thanks!


r.b.

Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburgholzer at deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Kevin Neufeld
Sent: Monday, August 25, 2008 5:51 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] schema name for a temp table?

SELECT nspname FROM pg_namespace WHERE oid = pg_my_temp_schema();

But what exactly do you mean by "spatially enabled"?  Any table with a
geometry column is "spatially enabled".  It may not be registered with
the geometry_columns metadata table or have spatial constraints on it,
but it is capable of holding spatial data.

ie.
CREATE TEMP TABLE test (id integer, the_geom geometry);
\d
     Table "pg_temp_11.test"
  Column  |   Type   | Modifiers
----------+----------+-----------
 id       | integer  |
 the_geom | geometry |

Cheers,
Kevin


Burgholzer,Robert wrote:
> I have a temporary table that I would like to spatially enable.  Thus,
I
> need to know the proper schema name, assuming that the schema name
would
> change if there were multiple temp tables with the same name (a
> possibility if several users are hitting the app simultaneously).
>
>
>
> Has anyone had any experience with this?
>
>
>
> Thanks!
>
> r/b/
>
>
>
> Robert W. Burgholzer
>
> Surface Water Modeler
>
> Office of Water Supply and Planning
>
> Virginia Department of Environmental Quality
>
> rwburgholzer at deq.virginia.gov
>
> 804-698-4405
>
> Open Source Modeling Tools:
>
> http://sourceforge.net/projects/npsource/
>
>
>
>
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users




-- 
************************************
David William Bitner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080826/92a78ac1/attachment.html>


More information about the postgis-users mailing list