Re: creating index names automatically?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: creating index names automatically?
Date: 2009-12-23 11:37:44
Message-ID: 407d949e0912230337l50f5547au7a91a96c75c368d7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 23, 2009 at 3:54 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> David E. Wheeler wrote:
>>> +1 if it prevents indexes from being named "CONCURRENTLY".
>
>> Yeah, if you really want to have an index named like that you can use
>> double quotes.  Seems a sensible compromise.
>
> Well, this will also break tables and columns named "concurrently".
> I think the odds of it being a problem are small, but still it is
> a reserved word that shouldn't be reserved according to the SQL spec.

I suppose we could fix this by specifying a precedence and then
explicitly checking if you're trying to make an index named
concurrently and fixing it up later. Not unlike how you suggested we
avoid making WITH a reserved word with the comment that there was more
than one way to skin a cat

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-12-23 12:24:42 Re: fdw validation function vs zero catalog id
Previous Message Heikki Linnakangas 2009-12-23 10:50:13 Re: Backup history file should be replicated in Streaming Replication?