Re: creating index names automatically?

Greg Stark <gsstark@mit.edu>

From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, "David E. Wheeler" <david@kineticode.com>, Peter Eisentraut <peter_e@gmx.net>, pgsql-hackers@postgresql.org
Date: 2009-12-23T11:37:44Z
Lists: pgsql-hackers
On Wed, Dec 23, 2009 at 3:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.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