metadata and views - Mailing list pgsql-general

From Rip
Subject metadata and views
Date
Msg-id 5.1.0.14.2.20020221202940.009fd430@mail.onlineinfo.net
Whole thread Raw
Responses Re: metadata and views  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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?



pgsql-general by date:

Previous
From: "Thalis A. Kalfigopoulos"
Date:
Subject: Re: environment variables, output format & setting current
Next
From: Tom Lane
Date:
Subject: Re: Follow Up: How to properly build postgresql version 7.2 on Unix Platforms?