Re: creating index names automatically? - Mailing list pgsql-hackers

From Ron Mayer
Subject Re: creating index names automatically?
Date
Msg-id 4B2DEA0C.4020008@cheapcomplexdevices.com
Whole thread Raw
In response to creating index names automatically?  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut wrote:
> 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.  

Why wouldn't it default to a name more like:
 CREATE INDEX "foo(a)" on foo(a);

which would extend pretty nicely to things like:
 CREATE INDEX "foo USING GIN(hstore)" ON foo USING GIN(hstore);'

Seems to be both more readable and less chance for arbitrary
collisions if I have column names with underscores.  Otherwise
what would the rule distinguishing "create index on foo(a_b)"
from "create index on foo(a,b)", etc.






pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: alpha3 bundled -- please verify
Next
From: James William Pye
Date:
Subject: Re: alpha3 bundled -- please verify