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

Re: BUG #2598: Columns named R are not accessible - although R is not a keyword

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Langegger <al(at)jku(dot)at>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2598: Columns named R are not accessible - although R is not a keyword
Date: 2006-08-30 16:37:56
Message-ID: 28682.1156955876@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Andreas Langegger <al(at)jku(dot)at> writes:
> Well, I also tried your simple regression test and it worked. The more
> I'm wondering why this does not:

> CREATE TABLE sunspots
> ...
>   "R" int2,

"R" with double quotes represents capital R, but when you write R
without quotes in a query, it's implicitly downcased.  See
http://www.postgresql.org/docs/8.1/static/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS

If you spell it like that in the table definition then you'll need
to use quotes every time you refer to the column, too.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Charlie SavageDate: 2006-08-30 16:59:24
Subject: Re: BUG #2594: Gin Indexes cause server to crash on Windows
Previous:From: Andreas LangeggerDate: 2006-08-30 15:35:44
Subject: Re: BUG #2598: Columns named R are not accessible - although

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