Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-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

pgsql-sql by date

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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group