Syntax question
Here are the two syntaxes we can use for turning off clustering:
1) ALTER TABLE / SET WITHOUT CLUSTER
This will turn off clusting on any index on the table that has it
enabled. It won't recurse so as to match the CLUSTER ON syntax.
However, this form makes the non-standardy SET WITHOUT form more
emphasised...
2) ALTER TABLE / DROP CLUSTER ON idx
I like this form, however to make it work, we need to bump CLUSTER to
being a reserved keyword. This form looks more like SQL standard, and
is related to the CLUSTER ON form.
Which one do we want?
Chris
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
2) ALTER TABLE / DROP CLUSTER ON idx
I like this form, however to make it work, we need to bump CLUSTER to
being a reserved keyword.
I do not think this form is enough better than the other to justify
creating a nonstandard fully-reserved word. I'd go with SET WITHOUT.
regards, tom lane
For what it's worth, I like the second form better.
Mike
Show quoted text
-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Christopher
Kings-Lynne
Sent: Sunday, May 23, 2004 6:08 AM
To: PostgreSQL-development
Subject: [HACKERS] Syntax questionHere are the two syntaxes we can use for turning off clustering:
1) ALTER TABLE / SET WITHOUT CLUSTER
This will turn off clusting on any index on the table that has it
enabled. It won't recurse so as to match the CLUSTER ON syntax.
However, this form makes the non-standardy SET WITHOUT form more
emphasised...2) ALTER TABLE / DROP CLUSTER ON idx
I like this form, however to make it work, we need to bump CLUSTER to
being a reserved keyword. This form looks more like SQL standard, and
is related to the CLUSTER ON form.Which one do we want?
Chris
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match