Skip site navigation (1) Skip section navigation (2)

Re: table column information

From: "Scot L(dot) Harris" <webid(at)cfl(dot)rr(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: table column information
Date: 2004-05-18 22:02:12
Message-ID: 1084917731.2058.293.camel@lathe (view raw or flat)
Thread:
Lists: pgsql-php
On Tue, 2004-05-18 at 17:53, Robert Treat wrote:
> A little late to the party, but it seems worth mentioning that this 
> information is also available in the information_schema, which has the 
> benefits of being sql complient, stable across releases, and keeps you out of 
> the system catalogs.  for example:
> 
> cms74=# select column_name from information_schema.columns where table_name = 
> 'current_downloads';
>  column_name 
> -------------
>  start_time
>  entity_id
> (2 rows)
> 
> for more on information schema check out 
> http://www.postgresql.org/docs/7.4/interactive/information-schema.html
> 
> Robert Treat

That looks like a nice way to get that information.  Thanks for another
good tip.


-- 
Scot L. Harris <webid(at)cfl(dot)rr(dot)com>


In response to

pgsql-php by date

Next:From: Paul LynchDate: 2004-05-19 04:59:24
Subject: Re: Parsing Data, Table to Form
Previous:From: Robert TreatDate: 2004-05-18 21:53:35
Subject: Re: table column information

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group