Re: ALTER TABLE / CLUSTER ON - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: ALTER TABLE / CLUSTER ON
Date
Msg-id 08cc01c2ef5d$90a848e0$6500a8c0@fhp.internal
Whole thread Raw
In response to ALTER TABLE / CLUSTER ON  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: ALTER TABLE / CLUSTER ON
List pgsql-hackers
I just managed to break the CLUSTER ON patch:

test=# create table test (a int4 primary key, b int4 unique, c int4);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey'
for table 'test'
NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'test_b_key' for
table 'test'
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey'
for table 'test'
NOTICE:  CREATE TABLE / UNIQUE will create implicit index 'test_b_key' for
table 'test'
CREATE TABLE
test=# create index blah on test(c);
CREATE INDEX
test=# alter table test cluster on a;
ERROR:  ALTER TABLE: cannot find index "a" for table "test"
ERROR:  ALTER TABLE: cannot find index "a" for table "test"
test=# alter table test cluster on blah;
ALTER TABLE
test=# alter table only test cluster on blah;
ERROR:  parser: parse error at or near "cluster" at character 23
ERROR:  parser: parse error at or near "cluster" at character 23
test=# alter table test cluster on blah;
NOTICE:  ALTER TABLE: table "test" is already being clustered on index
"blah"
WARNING:  Cache reference leak: cache pg_index (16), tuple 0 has count 1
NOTICE:  ALTER TABLE: table "test" is already being clustered on index
"blah"
WARNING:  Cache reference leak: cache pg_index (16), tuple 0 has count 1
ALTER TABLE

Chris



pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Nested transactions: low level stuff
Next
From: Jeff Davis
Date:
Subject: Re: Roadmap for FE/BE protocol redesign