Re: Help with queries...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Cristian Prieto" <cristian(at)clickdiario(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help with queries...
Date: 2005-02-24 22:22:14
Message-ID: 27942.1109283734@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Cristian Prieto" <cristian(at)clickdiario(dot)com> writes:
> The book says:
> [snip]

> But my table name Grupos is not a reserved keyword, so SELECT * FROM Grupos;
> should work, right??? but guess what... It doesn't work too... I need to
> pass SELECT * FROM "Grupos";

You didn't read far enough:

Quoting an identifier also makes it case-sensitive, whereas unquoted
names are always folded to lower case. For example, the identifiers FOO,
foo, and "foo" are considered the same by PostgreSQL, but "Foo" and
"FOO" are different from these three and each other.

Had you originally created the table as Grupos without quotes, then you
could refer to it as Grupos without quotes. But you evidently created
it with quotes (or used a tool that added quotes for you) and now you're
stuck with using quotes forevermore, unless you rename the table.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-02-24 22:25:10 Re: basic trigger using OLD not working?
Previous Message Rick Casey 2005-02-24 22:13:52 Re: basic trigger using OLD not working?