![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, is there a way to have a default index name for columns? for example, instead of writing: create index foo on bar (foo); write only: create index on bar (foo); or better: create index on bar.foo; |
#3
| |||
| |||
|
|
Anselmo Canfora<nobody (AT) nowhere (DOT) net> wrote: Hi, is there a way to have a default index name for columns? for example, instead of writing: create index foo on bar (foo); write only: create index on bar (foo); or better: create index on bar.foo; Tom Lane commited such a feature, see: http://www.postgresql.org/community/...ws/pwn20091227 - Allow the index name to be omitted in CREATE INDEX, causing the system to choose an index name the same as it would do for an unnamed index constraint |
#4
| |||
| |||
|
|
Andreas Kretschmer, 19.01.2010 15:57: Tom Lane commited such a feature, see: http://www.postgresql.org/community/...ws/pwn20091227 - Allow the index name to be omitted in CREATE INDEX, causing the system to choose an index name the same as it would do for an unnamed index constraint Nice one. Does "Tom Lane commited" mean, that this will definitely appear in 8.5 (aka "next version)? Or does it need some kind of review/approval process that might cause it to not appear in the next version? |
#5
| |||
| |||
|
|
Thomas Kellerer<OTPXDAJCSJVU (AT) spammotel (DOT) com> wrote: Andreas Kretschmer, 19.01.2010 15:57: Tom Lane commited such a feature, see: http://www.postgresql.org/community/...ws/pwn20091227 - Allow the index name to be omitted in CREATE INDEX, causing the system to choose an index name the same as it would do for an unnamed index constraint Nice one. Does "Tom Lane commited" mean, that this will definitely appear in 8.5 (aka "next version)? Or does it need some kind of review/approval process that might cause it to not appear in the next version? I don't know, sorry. But i think, commited means this feature will be in 8.4+1 ;-) Andreas |
is there a plan to do something similar on cases such, for example:
#6
| |||
| |||
|
|
Il 19/01/2010 17.03, Andreas Kretschmer ha scritto: Thomas Kellerer<OTPXDAJCSJVU (AT) spammotel (DOT) com> wrote: Andreas Kretschmer, 19.01.2010 15:57: Tom Lane commited such a feature, see: http://www.postgresql.org/community/...ws/pwn20091227 - Allow the index name to be omitted in CREATE INDEX, causing the system to choose an index name the same as it would do for an unnamed index constraint Nice one. Does "Tom Lane commited" mean, that this will definitely appear in 8.5 (aka "next version)? Or does it need some kind of review/approval process that might cause it to not appear in the next version? I don't know, sorry. But i think, commited means this feature will be in 8.4+1 ;-) Andreas Fine is there a plan to do something similar on cases such, for example:alter table foo add constraint constraint_name check (bar between 0 and 255); |

#7
| |||
| |||
|
|
is there a way to have a default index name for columns? for example, instead of writing: create index foo on bar (foo); write only: create index on bar (foo); |
|
or better: create index on bar.foo; |
#8
| |||
| |||
|
|
create index on bar.foo; Your second proposal will not work for the general case because you can index a tupel of columns not necessarily only one column. |
#9
| |||
| |||
|
|
[CUT] create index on bar.foo; Your second proposal will not work for the general case because you can index a tupel of columns not necessarily only one column. perhaps: create index on (bar.first, bar.second); would work? |
#10
| |||
| |||
|
|
Anselmo Canfora wrote: [CUT] create index on bar.foo; Your second proposal will not work for the general case because you can index a tupel of columns not necessarily only one column. perhaps: create index on (bar.first, bar.second); would work? Why would anyone want to repeat bar ad infinitum? |

![]() |
| Thread Tools | |
| Display Modes | |
| |