Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

Next:From: Tom LaneDate: 2010-05-27 20:08:34
Subject: Re: List traffic
Previous:From: alvherreDate: 2010-05-27 19:29:28
Subject: Re: List traffic

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group