How does this query work.....?

From: RbrtBrn3(at)aol(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: How does this query work.....?
Date: 2001-03-09 10:29:01
Message-ID: 28.1237f87b.27da50bd@aol.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I am using the following query to find the attributes of a given table, and
their datatypes:

select typname,attname
from pg_class c, pg_attribute a,pg_type t
where relname = 'table_name' and
attrelid = c.oid and
atttypid = t.oid and
attnum > 0;

Can anybody explain how this query actually works - I cannot figure it.
Thanks in advance.

Rob Burne.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2001-03-09 11:16:04 Re: List Concatination
Previous Message Josh Berkus 2001-03-09 05:17:27 List Concatination