Re: Problem running or executing a function in Postgresql

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Venki <Venki(at)insoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem running or executing a function in Postgresql
Date: 2005-09-01 10:10:53
Message-ID: 20050901101053.GA26810@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 01, 2005 at 11:58:27AM +0530, Venki wrote:
>
> new_id = EXECUTE("SELECT FROM currval("mydata_id_seq")");

The above line has quoting problems and an erroneous SELECT query,
and it wouldn't work anyway because that's not the way to retrieve
results from EXECUTE. Aside from that, EXECUTE isn't necessary in
this case. Try this:

new_id := currval(''mydata_id_seq'');

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-09-01 10:11:12 Re: syslog message I do not understand
Previous Message Richard Huxton 2005-09-01 10:08:06 Re: Problem running or executing a function in Postgresql