limit to default display in psql

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: limit to default display in psql
Date: 2009-11-16 05:42:40
Message-ID: 200911160042.40429.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In the following query (used by psql to show attribute defaults)

SELECT a.attname,
pg_catalog.format_type(a.atttypid, a.atttypmod),
(SELECT substring(pg_catalog.pg_get_expr(d.adbin, d.adrelid) for 128)
FROM pg_catalog.pg_attrdef d
WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef),
a.attnotnull, a.attnum
FROM pg_catalog.pg_attribute a
WHERE a.attrelid = '32923' AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

Is there some significance to the 128 other than simple formatting?

Also, if anyone knows when pg_attrdef.adsrc became unreliable, that would save
me some trouble. Thanks in advance.

--
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-16 05:44:00 Re: ORDER BY vs. volatile functions
Previous Message Andrew Gierth 2009-11-16 05:28:15 ORDER BY vs. volatile functions