Re: function return value inside a trigger function - Mailing list pgsql-general

From Bosco Rama
Subject Re: function return value inside a trigger function
Date
Msg-id 5063A6E2.1020609@boscorama.com
Whole thread Raw
In response to function return value inside a trigger function  (joao viegas <jtamviegas@yahoo.co.uk>)
List pgsql-general
On 09/26/12 17:56, joao viegas wrote:
>
> does anybody knows how can I have something like:
> select function_that_returns_int(NEW.field1) into NEW.field2;

I think you want:
   select into NEW.field2 function_that_returns_int(NEW.field1);

or even:
   NEW.field2 := function_that_returns_int(NEW.field1);


Bosco.


pgsql-general by date:

Previous
From: joao viegas
Date:
Subject: function return value inside a trigger function
Next
From: Stephen Frost
Date:
Subject: Re: PostgreSQL, OLAP, and Large Clusters