metadata and views

From: Rip <rip(at)onlineinfo(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: metadata and views
Date: 2002-02-22 01:53:49
Message-ID: 5.1.0.14.2.20020221202940.009fd430@mail.onlineinfo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,
I trying to extract the metadata from a view and getting spotty results.
Using the following:

SELECT a.attnum, a.attname, t.typname, a.attlen, a.atttypmod, a.attnotnull,
a.atthasdef FROM pg_class as c, pg_attribute a, pg_type t WHERE a.attnum >
0 and a.attrelid = c.oid and c.relname = 'users' and a.atttypid = t.oid
order by a.attnum

I get correct results on a table for a.attnum, a.attname, t.typname,
a.attlen, a.atttypmod, a.attnotnull and a.atthasdef, but for a view
a.attnotnull and a.atthasdef return nothing.

Any clues anyone?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lee Harr 2002-02-22 01:54:42 Re: Createdb problems
Previous Message Lee Harr 2002-02-22 01:50:45 Re: deleting an identical record