Re: case dumbiness in return from functions

From: "Gregory Williamson" <Gregory(dot)Williamson(at)digitalglobe(dot)com>
To: "Nico Sabbi" <nsabbi(at)officinedigitali(dot)it>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: case dumbiness in return from functions
Date: 2008-01-18 12:39:16
Message-ID: 8B319E5A30FF4A48BE7EEAAF609DB233015E3238@COMAIL01.digitalglobe.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Nico Sabbi wrote:

>
> Tom Lane ha scritto:
> > Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> >
> >> After discovering that pg_get_serial_sequence behaves in a bit
> >> strange way[1] when it deals to case sensitiveness
> >>
> >
> > The SQL standard specifies that unquoted identifiers are case-insensitive.
> > You're welcome to spell them as camelCase in your source code if you
> > feel like it, but don't expect that PG, or any other SQL-compliant
> > database, will pay attention.
> >
> > regards, tom lane
>
> yet I find disturbing that Postgres doesn't make the effort
> to respect the case specified by the user. If I created a field
> called "REF" why should Postgres call it "ref" in the output of queries
> if the standard doesn't specify any obligation to convert the name ?
> I'd like to have the possibility to enable this feature in future releases.

Why should it PostgreSQL "make the effort" ?

Tom was _very_ clear in the SQL standard.

Oracle and Informix also ignore your capitals, although they behave slightly differently in forcing things to upper or lower case. In Informix:

create table FOO (FooId SERIAL PRIMARY KEY);

INFO - foo: Columns Indexes Privileges References Status ...
Display column names and data types for a table.
----------------------- billing(at)arches_ip ------ Press CTRL-W for Help --------
Column name Type Nulls
fooid serial no

Bottom line: well documented in all databases I have seen. Not very important -- if you really care (why on earth would you?) then double quote things like table and column names.

I would _far_ rather have developers work on resolving subtle issues, or adding *useful* features than this sort of basura.

Greg Williamson
Senior DBA
GlobeXplorer LLC, a DigitalGlobe company

Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information and must be protected in accordance with those provisions. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

(My corporate masters made me say this.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2008-01-18 12:42:50 Re: case dumbiness in return from functions
Previous Message Steve Clark 2008-01-18 12:38:38 Re: pg_dumpall