Re: Are SQL queries locale dependent?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martin Schäfer <Martin(dot)Schaefer(at)cadcorp(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Are SQL queries locale dependent?
Date: 2005-02-25 15:51:53
Message-ID: 5469.1109346713@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

=?iso-8859-1?Q?Martin_Sch=E4fer?= <Martin(dot)Schaefer(at)cadcorp(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-02-25 16:15:15 Re: postgresql 8.0 advantages
Previous Message Dave Smith 2005-02-25 15:46:43 JDBC and Portals . Clarification

Browse pgsql-sql by date

  From Date Subject
Next Message Ragnar Hafstað 2005-02-26 13:24:19 Re: Read count ?
Previous Message Martin Schäfer 2005-02-25 09:41:03 Are SQL queries locale dependent?