X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D17D7563B8; Fri, 25 Feb 2005 09:40:46 +0000 (GMT) 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 93039-10; Fri, 25 Feb 2005 09:40:41 +0000 (GMT) Received: from smarthost2.mail.uk.easynet.net (smarthost2.mail.uk.easynet.net [212.135.6.12]) by svr1.postgresql.org (Postfix) with ESMTP id F36A152A76; Fri, 25 Feb 2005 09:40:40 +0000 (GMT) Received: from [195.40.158.200] (helo=dev001_pdc.Dev.cadcorp.net) by smarthost2.mail.uk.easynet.net with esmtp (Exim 4.10) id 1D4bxy-0008Vm-00; Fri, 25 Feb 2005 09:40:58 +0000 Received: from dev010_ex.Dev.cadcorp.net ([10.0.1.10]) by dev001_pdc.Dev.cadcorp.net with Microsoft SMTPSVC(5.0.2195.6713); Fri, 25 Feb 2005 09:41:04 +0000 Content-class: urn:content-classes:message Subject: Are SQL queries locale dependent? Date: Fri, 25 Feb 2005 09:41:03 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: X-MS-Has-Attach: X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 X-MS-TNEF-Correlator: Thread-Topic: Are SQL queries locale dependent? Thread-Index: AcUbHh9gESt4kN15TDuLsKnFciqeCQ== From: =?iso-8859-1?Q?Martin_Sch=E4fer?= To: , X-OriginalArrivalTime: 25 Feb 2005 09:41:04.0457 (UTC) FILETIME=[1FB0B390:01C51B1E] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/1328 X-Sequence-Number: 74132 Hi, I recently found out that my app doesn't work in Spain because it = creates localized queries like this: create table t (c1 float8, c2 float8); insert into t (c1, c2) values (3,14159, 1,4142); I understand that PostgreSQL obviously can't parse this query. But I'm = not sure how to fix this query so that it works under all circumstances. If the database uses the "C" (or e.g. English or US) locale, then I know = that I always have to use the decimal dot ('.') instead of a decimal = comma (','), regardless of the locale of the client machine. But what if the database itself uses a locale which mandates a decimal = comma, like Spanish, German, etc.? How do I have to construct the SQL = query then? Martin