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

Re: BUG #1364: using field names or table names with blanks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pit Mueller" <fmi-soft(at)gmx(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1364: using field names or table names with blanks
Date: 2004-12-30 00:20:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Pit Mueller" <fmi-soft(at)gmx(dot)de> writes:
> MS SQL Server uses a quite elegant method for using field names and table
> names:

> select [field] from [table] 
> f.ex. select [my field] from [the big table]

One man's "elegant" is another's "ugly and nonstandard".

> PostgreSQL 8.0 should support this notation too.

Not likely.  Use double quotes like the SQL standard tells you to:

	select "my field" from "the big table"

One would hope that SQL Server takes this too, since they claim some
amount of spec compliance.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Hong YuanDate: 2004-12-30 02:52:51
Subject: BUG #1367: Unique constraint fails with some values
Previous:From: Tom LaneDate: 2004-12-30 00:17:24
Subject: Re: function return type for triggers in postgresql 8.0 rc2

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