Re: plpsql function problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)hu
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: plpsql function problem
Date: 2005-01-05 20:53:16
Message-ID: 952.1104958396@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

drdani(at)mazsola(dot)iit(dot)uni-miskolc(dot)hu writes:
> function
> .
> insert into table1 ... --> trigger function (runs after insert)
> .
> insert into table2 ...
> .
> select from table2 ... not found
> .

> This info looks to be unavailable inside the function. Can it be made
> availabel or must this whole thing reorgenized?

If it's an AFTER trigger, the trigger is currently not fired until the
end of the entire command (ie, whatever interactive command called your
function). So the SELECT isn't seeing the result because it hasn't
happened yet.

This will change in PG 8.0.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message TJ O'Donnell 2005-01-05 21:31:17 undigested email
Previous Message drdani 2005-01-05 19:45:21 plpsql function problem