From: Tom Lane <tgl@sss.pgh.pa.us>
To: jtv@xs4all.nl
Cc: Johan C. de Koning <johan.de.koning@geodan.nl>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Getting oid with libpq
Date: Thu, 11 Aug 2005 09:57:24 -0400
Message-ID: <21817.1123768644@sss.pgh.pa.us> (raw)
In-Reply-To: <8327.202.47.227.25.1123743997.squirrel@202.47.227.25>
References: <10445.202.47.227.25.1123671132.squirrel@202.47.227.25>
<200508101213.j7ACD9lb077874@mxdrop11.xs4all.nl>
<8327.202.47.227.25.1123743997.squirrel@202.47.227.25>
jtv@xs4all.nl writes:
> const char *OldLocale = setlocale(LC_NUMERIC, "C");
> Then run the pointer returned by PQgetValue() through atol() to get a
> numeric value, and finally restore the previous locale with
> setlocale(LC_NUMERIC, OldLocale);
Uh ... there is nothing at all locale-sensitive about atol, nor strtoul
which is what you really want to use for an OID.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, jtv@xs4all.nl, johan.de.koning@geodan.nl
Subject: Re: Getting oid with libpq
In-Reply-To: <21817.1123768644@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox