From: Lee Hachadoorian <lee.hachadoorian@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to get geometry enabled Tables form Postgresql/postgis
Date: Thu, 29 Jul 2010 16:13:44 -0400
Message-ID: <4C51E0F8.9050809@gmail.com> (raw)
In-Reply-To: <AANLkTi=xDoxzM_WZwpBh04zxqj=-GCdxjW1te7DPx3=s@mail.gmail.com>
References: <AANLkTi=xDoxzM_WZwpBh04zxqj=-GCdxjW1te7DPx3=s@mail.gmail.com>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
All geometric columns in all spatially enabled tables appear in the
table public.geometry_columns, defined as:<br>
<br>
<pre>CREATE TABLE public.geometry_columns</pre>
<pre>(</pre>
<pre> f_table_catalog character varying(256) NOT NULL,</pre>
<pre> f_table_schema character varying(256) NOT NULL,</pre>
<pre> f_table_name character varying(256) NOT NULL,</pre>
<pre> f_geometry_column character varying(256) NOT NULL,</pre>
<pre> coord_dimension integer NOT NULL,</pre>
<pre> srid integer NOT NULL,</pre>
<pre> "type" character varying(30) NOT NULL,</pre>
<pre> CONSTRAINT geometry_columns_pk PRIMARY KEY (f_table_catalog, f_table_schema, f_table_name, f_geometry_column)</pre>
<pre>)</pre>
<pre>WITH (</pre>
<pre> OIDS=TRUE</pre>
<pre>);</pre>
<br>
For tables only, a simple <br>
<pre>SELECT DISTINCT f_table_schema, f_table_name FROM geometry_columns; </pre>
should do the trick. <br>
<br>
--Lee<br>
<br>
On 07/29/2010 08:58 AM, venkat wrote:
<blockquote
cite="mid:AANLkTi=xDoxzM_WZwpBh04zxqj=-GCdxjW1te7DPx3=s@mail.gmail.com"
type="cite"><font color="#3366ff"><span class="Apple-style-span"
style="color: rgb(0, 0, 0);"><font color="#3366ff">Dear All,</font>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff"> How can i retrieve only spatial
enabled tables form the database(Postgresql/PostGIS).Please let me
know. </font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">I am waiting for your great response.</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">Thanks and Regards,</font></div>
<div><font color="#3366ff"><br>
</font></div>
<div><font color="#3366ff">Venkat</font></div>
</span></font></blockquote>
<br>
<pre class="moz-signature" cols="72">--
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center
</pre>
</body>
</html>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lee.hachadoorian@gmail.com
Subject: Re: How to get geometry enabled Tables form Postgresql/postgis
In-Reply-To: <4C51E0F8.9050809@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox