Re: ALTER TABLE...SET WITHOUT CLUSTER

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: ALTER TABLE...SET WITHOUT CLUSTER
Date: 2004-04-27 14:15:11
Message-ID: 200404271415.i3REFBu06927@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Christopher Kings-Lynne wrote:
> > This patch imlements the TODO that calls for the ability to turn off all
> > clustering on a table.
> >
> > Syntax is ALTER TABLE ... SET WITHOUT CLUSTER;
> >
> > Doc patch plus regression test is included.
>
> OK, I have a problem here. This is the new grammar that I added:
>
> /* ALTER TABLE <name> SET WITHOUT CLUSTER */
> | ALTER TABLE relation_expr SET WITHOUT CLUSTER
> {
> AlterTableStmt *n = makeNode(AlterTableStmt);
> n->subtype = 'L';
> n->relation = $3;
> n->name = NULL;
> $$ = (Node *)n;
> }
>
> Now, I have to change that relation_expr to qualified_name. However,
> this causes shift/reduce errors. (Due to ALTER TABLE relation_expr SET
> WITHOUT OIDS.)
>
> Even changing the syntax to "qualified_name DROP CLUSTER" doesn't work
> due to the existence of "relation_expr DROP ...".

I have an idea. Change the code to use relation_expr, then throw an
error from gram.y if $$->inhOpt != INH_DEFAULT.

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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-04-27 15:02:33 Re: ALTER TABLE...SET WITHOUT CLUSTER
Previous Message Bruce Momjian 2004-04-27 13:04:24 Re: [BUGS] BUG #1134: ALTER USER ... RENAME breaks md5