pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martin Schäfer <Martin.Schaefer@cadcorp.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: Are SQL queries locale dependent?
Date: Fri, 25 Feb 2005 10:51:53 -0500
Message-ID: <5469.1109346713@sss.pgh.pa.us> (raw)
In-Reply-To: <AA31868BC8CE1B4DB132141A6556A20A8D90@dev010_ex.Dev.cadcorp.net>
References: <AA31868BC8CE1B4DB132141A6556A20A8D90@dev010_ex.Dev.cadcorp.net>

=?iso-8859-1?Q?Martin_Sch=E4fer?= <Martin.Schaefer@cadcorp.com> writes:
> 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.

Use dots.  The SQL syntax for a number is not locale-dependent.

			regards, tom lane



view thread (2+ messages)

Message-ID: <5469.1109346713@sss.pgh.pa.us>
Permalink:  ../5469.1109346713@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5469.1109346713@sss.pgh.pa.us

 · 

reply

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Martin.Schaefer@cadcorp.com, pgsql-general@postgresql.org
  Subject: Re: Are SQL queries locale dependent?
  In-Reply-To: <5469.1109346713@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