X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3C82F52990 for ; Thu, 11 Aug 2005 10:57:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31330-02 for ; Thu, 11 Aug 2005 13:57:43 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8B5EF52986 for ; Thu, 11 Aug 2005 10:57:41 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j7BDvOtw021818; Thu, 11 Aug 2005 09:57:24 -0400 (EDT) To: jtv@xs4all.nl Cc: "Johan C. de Koning" , pgsql-interfaces@postgresql.org Subject: Re: Getting oid with libpq 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> Comments: In-reply-to jtv@xs4all.nl message dated "Thu, 11 Aug 2005 09:06:37 +0200" Date: Thu, 11 Aug 2005 09:57:24 -0400 Message-ID: <21817.1123768644@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/20 X-Sequence-Number: 5691 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