Thread: type aliases in 7.0.3

type aliases in 7.0.3

From
"Christopher Kings-Lynne"
Date:
Hi guys,

A ways back I was told about the format_type function in postgres to get
type aliases.  Hence I can get a list of types like this:

SELECT typname FROM pg_type pt WHERE typname NOT LIKE '\\\_%'
AND typname NOT LIKE 'pg\\\_%'
UNION
SELECT format_type(pt.oid, NULL) FROM pg_type pt WHERE typname NOT LIKE
'\\\_%' AND typname NOT LIKE 'pg\\\_%'
EXCEPT
SELECT relname FROM pg_class ORDER BY typname;

Only problem - the format_type function only exists in 7.1 and above - how
do I do this query in 7.0.3??

This is for the phpPgAdmin project.

Chris