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

Re: BUG #4656: Indexes not used when comparing nextval() and currval() to integers

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: toruvinn <toruvinn(at)lain(dot)pl>
Cc: Mathias Seiler <mathias(dot)seiler(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4656: Indexes not used when comparing nextval() and currval() to integers
Date: 2009-02-16 10:18:21
Message-ID: 49993D6D.3020504@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
toruvinn wrote:
> On Mon, 16 Feb 2009 10:37:27 +0100, Heikki Linnakangas 
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> You can read the value returned by currval into a host language 
>> variable and send it back as a ?.
> Wouldn't it be possible to do UPDATE booking_entries SET date = ? where 
> id = (SELECT currval('booking_entries_id_seq'::regclass)); too?

Oh yes, that should work as well.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Tomasz KolajDate: 2009-02-16 10:28:05
Subject: BUG #4659: Can't configure static postgresql with static openssl
Previous:From: toruvinnDate: 2009-02-16 10:15:40
Subject: Re: BUG #4656: Indexes not used when comparing nextval() and currval() to integers

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