Re: pg_aggregate weird stuff

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Cohen <alex(at)toomuchspace(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_aggregate weird stuff
Date: 2004-03-11 06:43:54
Message-ID: 16688.1078987434@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alexander Cohen <alex(at)toomuchspace(dot)com> writes:
> Im trying to get a list of aggregate names. So i do "SELECT aggfnoid
> FROM pg_aggregate" to get a list of Oid of the functions. But this
> column seems to return names and not Oid's of the procs. Is this
> normal, how can i get a loist of proc Oid's for the aggregtates?

(1) Yes it is, see type regproc in the docs. (2) Cast to oid if
you want numeric output.

However, you might find it easier to look for pg_proc rows where
proisagg is true ... no join needed if you do that.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-03-11 07:01:15 Re: updates (postgreSQL) very slow
Previous Message Tom Lane 2004-03-11 04:33:05 Re: [ANNOUNCE] PostgreSQL 7.4.2 Now Available ...