Enclosed please find a sample:
cfmg_am=> select attname, typname from pg_attribute, pg_type, pg_class

cfmg_am-> where relname = 'pgt_processing'

cfmg_am-> and attrelid = pg_class.oid

cfmg_am-> and atttypid = pg_type.oid;

          attname           |  typname  
----------------------------+-----------
 pga_classname              | name
 pga_processedbytransaction | int4
 pga_transactionnumber      | int4
 pga_pid                    | int4
 backendpid                 | int4
 oid                        | oid
 ctid                       | tid
 xmin                       | xid
 xmax                       | xid
 cmin                       | cid
 cmax                       | cid
 pga_nodeip                 | inet
 pga_minorstatus            | bpchar
 pga_majorstatus            | bpchar
 pga_modifiedon             | timestamp
 pga_createdon              | timestamp
(16 rows)

Regards,
Andrzej Mazurkiewicz

[EMAIL PROTECTED]
www.mazurkiewicz.org


> -----Original Message-----
> From: Michael Hall [SMTP:[EMAIL PROTECTED]]
> Sent: 9 kwietnia 2000 17:58
> To:   [EMAIL PROTECTED]
> Subject:      [GENERAL] Selecting field names?
> 
> Is there a way to 'select' the names of the fields and the field types 
> of a table?
> 
> -- 
> Michael J. Hall, CCA                    Intelligence Technologies Int'l
> [EMAIL PROTECTED]                            http://www.inteltec.com
> secure: [EMAIL PROTECTED]

Reply via email to