Re: EXECUTE and FOUND

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Bogdan Gusiev <agresso(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: EXECUTE and FOUND
Date: 2010-05-27 19:33:45
Message-ID: AANLkTin85oFhrYNs7-fK8ry6viDk8DbyszqeEDg8CP-H@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/5/25 Bogdan Gusiev <agresso(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-05-27 20:08:34 Re: List traffic
Previous Message alvherre 2010-05-27 19:29:28 Re: List traffic