usage of pg_get_functiondef() -- SQL state 42809

From: <david(dot)sahagian(at)emc(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: usage of pg_get_functiondef() -- SQL state 42809
Date: 2012-03-19 20:24:10
Message-ID: F3CBFBA88397EA498B22A05FFA9EC49D697BA937@MX22A.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-- This works.

select
TRG.tgname, TFX.proname, pg_get_functiondef(TFX.oid) as fdef
from
pg_trigger TRG
inner join pg_proc TFX on TFX.oid = TRG.tgfoid
where
TRG.tgisinternal = true

-- This blows up. -- SQL state: 42809 -- ERROR: "array_agg" is an aggregate function

select
TRG.tgname, TFX.proname, pg_get_functiondef(TFX.oid) as fdef
from
pg_trigger TRG
inner join pg_proc TFX on TFX.oid = TRG.tgfoid
where
TRG.tgisinternal = true
and
pg_get_functiondef(TFX.oid) = 'whatever'

Can you help me understand why this blows up ?
I am running "PostgreSQL 9.1.2, compiled by Visual C++ build 1500, 64-bit"

-dvs-

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2012-03-19 20:30:37 Re: current thinking on Amazon EC2?
Previous Message Alvaro Herrera 2012-03-19 20:05:33 Re: BUG #6510: A simple prompt is displayed using wrong charset