Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it
isn't documented if it is??  I guess it's not really relevant is it?

Chris


Fri, 21 Mar 2003 11:21:16 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
ALTER TABLE / CLUSTER ON
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


Fri, 21 Mar 2003 11:54:24 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: ALTER TABLE / CLUSTER ON
On Fri, Mar 21, 2003 at 11:54:24AM +0800, Christopher Kings-Lynne wrote:
> I just managed to break the CLUSTER ON patch:

Damn... I dunno how I managed to miss this.  Please apply the attached
patch.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Licensee shall have no right to use the Licensed Software
for productive or commercial use. (Licencia de StarOffice 6.0 beta)
Fri, 21 Mar 2003 11:38:59 -0400
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: ALTER TABLE / CLUSTER ON
On Fri, Mar 21, 2003 at 11:21:16AM +0800, Christopher Kings-Lynne wrote:
> Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it
> isn't documented if it is??  I guess it's not really relevant is it?

Oh, sorry, the command does not recurse.  Should it?  The whole CLUSTER
thing does not recurse -- in fact that's why I didn't make the ALTER ...
CLUSTER ON version do it, but maybe it should.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)

Fri, 21 Mar 2003 11:40:59 -0400
Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: ALTER TABLE / CLUSTER ON

Patch applied.  Thanks.

---------------------------------------------------------------------------


Alvaro Herrera wrote:
> On Fri, Mar 21, 2003 at 11:54:24AM +0800, Christopher Kings-Lynne wrote:
> > I just managed to break the CLUSTER ON patch:
> 
> Damn... I dunno how I managed to miss this.  Please apply the attached
> patch.
> 
> -- 
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> Licensee shall have no right to use the Licensed Software
> for productive or commercial use. (Licencia de StarOffice 6.0 beta)

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 21 Mar 2003 10:42:55 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: ALTER TABLE / CLUSTER ON

Because indexes don't span to interited tables, I don't see how it could
recurse.


---------------------------------------------------------------------------

Alvaro Herrera wrote:
> On Fri, Mar 21, 2003 at 11:21:16AM +0800, Christopher Kings-Lynne wrote:
> > Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it
> > isn't documented if it is??  I guess it's not really relevant is it?
> 
> Oh, sorry, the command does not recurse.  Should it?  The whole CLUSTER
> thing does not recurse -- in fact that's why I didn't make the ALTER ...
> CLUSTER ON version do it, but maybe it should.
> 
> -- 
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "El destino baraja y nosotros jugamos" (A. Schopenhauer)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Fri, 21 Mar 2003 10:44:12 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: ALTER TABLE / CLUSTER ON
How can it recurse, actually - there won't be an index with the same name
in the subtable?

On Fri, 21 Mar 2003, Alvaro Herrera wrote:

> On Fri, Mar 21, 2003 at 11:21:16AM +0800, Christopher Kings-Lynne wrote:
> > Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it
> > isn't documented if it is??  I guess it's not really relevant is it?
>
> Oh, sorry, the command does not recurse.  Should it?  The whole CLUSTER
> thing does not recurse -- in fact that's why I didn't make the ALTER ...
> CLUSTER ON version do it, but maybe it should.
>
> --
> Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
> "El destino baraja y nosotros jugamos" (A. Schopenhauer)
>


Sat, 22 Mar 2003 12:47:43 +0800 (WST)
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: ALTER TABLE / CLUSTER ON