Re: nextval result type difference between 7.1.3 and 7.2.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jong-won Choi <jong-won(dot)choi(at)memetrics(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: nextval result type difference between 7.1.3 and 7.2.1
Date: 2002-09-10 13:51:34
Message-ID: 19077.1031665894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jong-won Choi <jong-won(dot)choi(at)memetrics(dot)com> writes:
> I use PostgreSQL, UnixODBC, and Lisp configuration.
> I call 'nextval' to get an ID on Lisp like:
> (query "select nextval('UNIQUE_ID_SEQUENCE')")
> With PostgreSQL 7.1.3 and UnixODBC 2.0.7 or 2.2.3 it returns an
> integer(ex, 123), but with PostgreSQL 7.2.1, it returns a string(ex,
> "123").

nextval returns bigint (int8) in 7.2 and later.

You can cast the result down to integer in your query, or you can
figure out why ODBC isn't coping ... I have a vague recollection
that this may be an ODBC configuration issue ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-10 14:13:33 Re: Psql regex is NFA or DFA?
Previous Message Weaver, Walt 2002-09-10 13:41:24 Re: Real time process monitor in Postgres