Sebastian Ritter написа:
Hi all,
I have a question regarding functions. How can I return zero rows from a
function whose return type is a table row? I did the following test and it
did not work as expected:
[...]
CREATE OR REPLACE FUNCTION foobar(boolean) RETURNS SETOF x AS $_$
DECLARE
Jim,
> Yes i'm aware this it is possible in 7.3 - can someone please confirm its
> not possible in 7.2 or provide me with an example of how to go about it.
It is sort of possible in 7.2, as a function can return a cursor to an
interface language capable of handling cursors. However, implementa
Josh Berkus wrote:
Tim,
That loop apparently does not find any matching rows, which would
have been inserted just before this row was, inside the same
transaction.
It was successfully finding those rows before, when the trigger was
AFTER INSERT. If I manually select those rows after the query
Tim,
> That loop apparently does not find any matching rows, which would
> have been inserted just before this row was, inside the same
> transaction.
>
> It was successfully finding those rows before, when the trigger was
> AFTER INSERT. If I manually select those rows after the query is
> commi
Ludwig Lim wrote:
Try changing the "AFTER" to "BEFORE"
CREATE TRIGGER projtask_insert_depend_trig BEFORE...
Changes made to the "NEW" will not be reflect in the
AFTER trigger since, the row is already inserted.
Thanks, however this seems to present a different problem now.
FOR depe
--- Tim Perdue <[EMAIL PROTECTED]> wrote:
> I have created a function in pl/pgsql to modify a
> row before it gets put
> into the database, but it seems my modification is
> being ignored, and
> the unmodified row is being inserted.
>
> I have confirmed with this RAISE EXCEPTION that my
> "NEW"
Tim Perdue <[EMAIL PROTECTED]> writes:
> I have created a function in pl/pgsql to modify a row before it gets put
^^^
> into the database, but it seems my modification is being ignored, and
> the unmodified row is being inserted.
> CREAT