![]() | |
#11
| |||
| |||
|
|
Andreas Kretschmer, 19.01.2010 15:57: 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 Nice one. Does "Tom Lane commited" mean, that this will definitely appear in 8.5 (aka "next version)? |
He seems to be the lead developer.|
Or does it need some kind of review/approval process that might cause it to not appear in the next version? |

#12
| |||
| |||
|
|
8.5 hasn't entered feature freeze yet, so stuff added in december should be included, you can download and compile the 8.5 alpha source and try it yourself ![]() |
#13
| |||
| |||
|
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); that would be turn into: alter table foo add constraint check (bar between 0 and 255); |
#14
| |||
| |||
|
|
Anselmo Canfora wrote: 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); that would be turn into: alter table foo add constraint check (bar between 0 and 255); Certainly not for this case, as that is already done: test=> CREATE TABLE t(id integer CHECK (id=1), x integer); Creates a check constraint without naming it. test=> ALTER TABLE t ADD CHECK (x=1); Adds a check constraint without naming it. The constraints are even given nice names: test=> SELECT c.conname test-> FROM pg_constraint c JOIN test-> pg_class t ON (c.conrelid = t.oid) JOIN test-> pg_namespace s ON (t.relnamespace = s.oid) test-> WHERE s.nspname = current_schema test-> AND t.relname = 't'; conname ------------ t_id_check t_x_check (2 rows) |

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