function return value inside a trigger function

From: joao viegas <jtamviegas(at)yahoo(dot)co(dot)uk>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: function return value inside a trigger function
Date: 2012-09-27 00:56:00
Message-ID: 1348707360.12684.YahooMailNeo@web171203.mail.ir2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Good Evening all,

does anybody knows how can I have something like:
select function_that_returns_int(NEW.field1) into NEW.field2;

i.e., getting a function output and assign it to a variable inside the trigger.

in a trigger function?
I'm always getting:
ERROR: SELECT query has no destination for result data

thanks in advance
jtv

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bosco Rama 2012-09-27 01:07:46 Re: function return value inside a trigger function
Previous Message Tom Lane 2012-09-27 00:48:53 Re: Odd Invalid type name error in postgresql 9.1