Re: creating index names automatically?

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
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-20 09:10:36
Message-ID: 4B2DEA0C.4020008@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James William Pye 2009-12-20 10:07:22 Re: alpha3 bundled -- please verify
Previous Message Peter Eisentraut 2009-12-20 08:36:54 alpha3 bundled -- please verify