Re: [GENERAL] Returning 0 rows from a PL/PGSQL

2005-02-20 Thread Vitaly Belman
Good thinking, it works :) Thanks. On Sat, 19 Feb 2005 16:53:52 -0800 (PST), Stephan Szabo <[EMAIL PROTECTED]> wrote: > On Sun, 20 Feb 2005, Vitaly Belman wrote: > > > I have the following plpgsql function: > > > > CREATE OR REPLACE FUNCTION public."temp"(int4) > > RETURNS public.books AS > >

Re: [GENERAL] Returning 0 rows from a PL/PGSQL

2005-02-19 Thread Stephan Szabo
On Sun, 20 Feb 2005, Vitaly Belman wrote: > I have the following plpgsql function: > > CREATE OR REPLACE FUNCTION public."temp"(int4) > RETURNS public.books AS > $BODY$DECLARE > old_book books%rowtype; > BEGIN > select * into old_book from books > where book_id = var_book_id; >

[GENERAL] Returning 0 rows from a PL/PGSQL

2005-02-19 Thread Vitaly Belman
I have the following plpgsql function: CREATE OR REPLACE FUNCTION public."temp"(int4) RETURNS public.books AS $BODY$DECLARE old_book books%rowtype; BEGIN select * into old_book from books where book_id = var_book_id; IF FOUND = false THEN return