System catalogues

From: Zak McGregor <zak(at)mighty(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: System catalogues
Date: 2001-04-30 12:42:16
Message-ID: 200104301242.OAA01441@zak.home.dom
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all

I have a problem which I'm not sure how to fix. I store my own metadata
about tables and databases in a central admin database. I would like to
combine data from the admin database with data from pg_attribute

for eg:
SELECT distinct a.attname FROM pg_class c, pg_attribute a, pg_type t WHERE
c.relkind = 'r' and c.relname = 'example' and a.attnum > 0 and
a.attrelid = c.oid and a.atttypid = t.oid ORDER BY attname

but where 'example' is a table in another database, not the admin
database. What I would like to do is a join on my admin metadata with the
data in pg_attribute to see where I have no metadata on the field in
question in the admin database. I hope that makes sense!

Is this possible? Has anyone written any sort of documentation on the
system catalogues that I might be able to read?

Thanks a lot guys

Cheers

Zak

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2001-04-30 13:23:03 Re: Performance of c, pl/perl, pl/pgsql
Previous Message Atul 2001-04-30 12:23:10 Re: Run a create object script ???