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

From: toruvinn <toruvinn(at)lain(dot)pl>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Mathias Seiler" <mathias(dot)seiler(at)gmail(dot)com>
Cc: 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:15:40
Message-ID: op.upfv4euu33x80h@insanity.lain.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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?

--
ru

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2009-02-16 10:18:21 Re: BUG #4656: Indexes not used when comparing nextval() and currval() to integers
Previous Message Brundle Fly 2009-02-16 09:39:29 BUG #4658: copy problem