Hi guys,

I'm fixing the function editor in phpPgAdmin, however there's a problem.  We
use this query to return a list of all the possible function return types:

SELECT typname
FROM pg_type pt
WHERE typname NOT LIKE '\\\_%' AND typname NOT LIKE 'pg\\\_%'
EXCEPT
SELECT relname
FROM pg_class
WHERE relkind = 'S'
ORDER BY typname;

Part of this result is this:

bit
bool
box
...
text
tid
time
timestamp
timetz
tinterval
transactions_log

Now the problem is that if you have a function with a defined return type of
'boolean' or 'timestamp with time zone' or 'timestamp without time zone',
how on earth do you match it to something in this list?  Alternatively, how
do I query in all the _alias_ types?

Chris


Tue, 11 Dec 2001 11:12:01 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
phpPgAdmin query help
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Now the problem is that if you have a function with a defined return type of
> 'boolean' or 'timestamp with time zone' or 'timestamp without time zone',
> how on earth do you match it to something in this list?

format_type(pg_type.oid, NULL) will deliver the prettified equivalent
name of each type.

			regards, tom lane

Mon, 10 Dec 2001 22:28:22 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: phpPgAdmin query help 