Re: id and ID in CREATE TABLE

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: stefan(at)extum(dot)com
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: id and ID in CREATE TABLE
Date: 2002-07-19 07:20:11
Message-ID: 20020719172011.A12484@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

On Sat, Jul 20, 2002 at 10:39:52AM +0300, stefan(at)extum(dot)com wrote:
>
> I forgot about "" Sorry. So if I would use names quoted then my questions
> are obsolete. Except one:
>
> So actually the only strange part would be PostgreSQL is folding to lower
> cases a column name ...

[snip]

> Why is like this ? Why not letting them upper case if they are not quoted
> ?

I think it's because many people think that uppercase column names suck. And
I agree with them. If you follow the given advice (either always quote
column names or never) then not only will your program work, it's will be
completely portable.

So, if you'd used your CREATE TABLE statememnt below, you wouldn't have had
this problem.

> > CREATE TABLE ttt (
> >
> > ID int2,
> > name text );
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Liddicott 2002-07-19 07:52:42 Re: Startup death!
Previous Message Curt Sampson 2002-07-19 07:05:08 Re: Bad HTML in Mail List Archives

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Jore 2002-07-19 09:09:09 Re: [SQL] id and ID in CREATE TABLE
Previous Message Christopher Kings-Lynne 2002-07-19 06:55:09 Re: [SQL] id and ID in CREATE TABLE