function currval(character varying) does not exist, PostgreSQL 8.1 beta3

From: "Jean-Pierre Pelletier" <pelletier_32(at)sympatico(dot)ca>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: function currval(character varying) does not exist, PostgreSQL 8.1 beta3
Date: 2005-10-20 19:53:09
Message-ID: BAYC1-PASMTP05E81F9F75ED0B8719529095730@CEZ.ICE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

pstmt = connection.prepareStatement("select currval(?)"); throws "function currval(character varying) does not exist"

Using pgAdmin, I could see that currval() now takes a regclass parameter, so
I got it to work using

pstmt = connection.prepareStatement("select currval(cast(cast(? as text) as regclass))");

Is currval(text) gone for good or is this an oversight?
If it's gone for good, is cast(cast(? as text) as regclass) the recommended way of handling this?

I am using PostgreSQL 8.1 beta3 under Windows XP Service Pack 2 with JDBC3 8.1 Build 402.
It worked fine with PostgreSQL 8.1 beta2 and with 8.0.*

Thanks,
Jean-Pierre Pelletier
e-djuster

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-10-20 20:21:24 Re: function currval(character varying) does not exist, PostgreSQL 8.1 beta3
Previous Message Chris Travers 2005-10-20 17:16:40 Re: BUG #1947: Enhancement Request - CONCAT() function