Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f383C1858498 for ; Sat, 7 Apr 2001 23:12:01 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from imo-m04.mx.aol.com (imo-m04.mx.aol.com [64.12.136.7]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f32M1JK53827 for ; Mon, 2 Apr 2001 18:01:19 -0400 (EDT) (envelope-from RbrtBrn3@aol.com) Received: from RbrtBrn3@aol.com by imo-m04.mx.aol.com (mail_out_v29.14.) id k.1e.138d30e8 (3992) for ; Mon, 2 Apr 2001 18:01:05 -0400 (EDT) From: RbrtBrn3@aol.com Message-ID: <1e.138d30e8.27fa50a1@aol.com> Date: Mon, 2 Apr 2001 18:01:05 EDT Subject: Can anyone explain how this works? To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_1e.138d30e8.27fa50a1_boundary" Content-Disposition: Inline X-Mailer: AOL 6.0 for Windows UK sub 58 X-Archive-Number: 200104/106 X-Sequence-Number: 2452 --part1_1e.138d30e8.27fa50a1_boundary Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, I recently posted this same question a few weeks back but lost the reply someone kindly sent. The question again how exactly does this query work: it will return all attributes and respective data types of a given table': select attname, typname from pg_class c, pg_attribute a, pg_type t where relname = relation_name and attrelid = c.oid and atttypid = t.oid and attnum > 0 order by attnum; Many thanks, Rob Burne. --part1_1e.138d30e8.27fa50a1_boundary Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi,

I recently posted this same question a few weeks back but lost the reply
someone kindly sent. The question again how exactly does this query work:

it will return all attributes and respective data types of a given table':

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

Many thanks,

Rob Burne.
--part1_1e.138d30e8.27fa50a1_boundary--