Re: EXECUTE and FOUND - Mailing list pgsql-general

From Pavel Stehule
Subject Re: EXECUTE and FOUND
Date
Msg-id AANLkTin85oFhrYNs7-fK8ry6viDk8DbyszqeEDg8CP-H@mail.gmail.com
Whole thread Raw
In response to EXECUTE and FOUND  (Bogdan Gusiev <agresso@gmail.com>)
List pgsql-general
2010/5/25 Bogdan Gusiev <agresso@gmail.com>:
> I am not sure if EXECUTE 'SELECT * FROM table" correctly sets FOUND
> variable.
>

no - it doesn't it

> EXECUTE 'SELECT * FROM ' || quote_ident(stmt.tablename) || ' limit 1';
> if found then
>  ....
> end if;
>
> Is there other way to check if EXECUTE 'SELECT ...' found something or
> not?
>

yes - see on GET DIAGNOSTICS statement in plpgsql docs

regards

Pavel Stehule

> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

pgsql-general by date:

Previous
From: Gary Fu
Date:
Subject: No lidbl.so in libpq.so (postgresql 8.4.4)
Next
From: Devrim GÜNDÜZ
Date:
Subject: Re: Download