Re: Getting oid with libpq - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Getting oid with libpq
Date
Msg-id 21817.1123768644@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting oid with libpq  (jtv@xs4all.nl)
Responses Re: Getting oid with libpq
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: jtv@xs4all.nl
Date:
Subject: Re: Getting oid with libpq
Next
From: "Johan C. de Koning"
Date:
Subject: Re: Getting oid with libpq