From: Tom Lane <tgl@sss.pgh.pa.us>
To: drdani@mazsola.iit.uni-miskolc.hu
Cc: pgsql-sql@postgresql.org
Subject: Re: plpsql function problem
Date: Wed, 05 Jan 2005 15:53:16 -0500
Message-ID: <952.1104958396@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.61.0501052037070.20666@mazsola.iit.uni-miskolc.hu>
References: <Pine.LNX.4.61.0501052037070.20666@mazsola.iit.uni-miskolc.hu>
drdani@mazsola.iit.uni-miskolc.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, drdani@mazsola.iit.uni-miskolc.hu
Subject: Re: plpsql function problem
In-Reply-To: <952.1104958396@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox