Re: Help with queries... - Mailing list pgsql-general

From Tom Lane
Subject Re: Help with queries...
Date
Msg-id 27942.1109283734@sss.pgh.pa.us
Whole thread Raw
In response to Re: Help with queries...  ("Cristian Prieto" <cristian@clickdiario.com>)
List pgsql-general
"Cristian Prieto" <cristian@clickdiario.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

pgsql-general by date:

Previous
From: Rick Casey
Date:
Subject: Re: basic trigger using OLD not working?
Next
From: Tom Lane
Date:
Subject: Re: basic trigger using OLD not working?