Re: creating index names automatically?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: creating index names automatically?
Date: 2009-12-23 03:01:40
Message-ID: 3257.1261537300@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> Could we create an option to create index names automatically, so you'd
>> only have to write

>> CREATE INDEX ON foo (a);

>> which would pick a name like foo_a_idx.

Having done all the groundwork to support that nicely, I find that it
doesn't work because of bison limitations :-(. AFAICT, the only way
we could support this syntax would be to make ON a reserved word.
Or at least more reserved than it is now. We used up all the wiggle
room we had by making CONCURRENTLY non-reserved.

Now ON is reserved according to SQL99, but I'm a bit hesitant to
make it so in our grammar for such a marginal feature as this.
Thoughts?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-23 03:09:13 Re: creating index names automatically?
Previous Message bin wang 2009-12-23 01:57:55 Re: join ordering via Simulated Annealing