Re: set value var via execute

From: Peter Kroon <plakroon(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: set value var via execute
Date: 2012-11-29 16:50:59
Message-ID: CAOh+DOmM-DUb1sPTLxZ8PYVnNiaDj-oosupQ-Uwq3oxOW7XUsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Go it:

execute 'select id from '||v_table||' order by random() limit 1'
into v_holder;

2012/11/29 Peter Kroon <plakroon(at)gmail(dot)com>

> --begin this
> fails------------------------------------------------------------------------------------------
> v_holder = execute 'select id from '||v_table||' order by random()
> limit 1';
> --end this
> fails-------------------------------------------------------------------------------------------
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2012-11-29 17:19:28 Re: When does CLUSTER occur?
Previous Message icholy 2012-11-29 16:40:06 libpq - PQsendQuery wait for complete result