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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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