Re: ALTER TABLE TODO items

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE TODO items
Date: 2004-05-07 02:02:22
Message-ID: 27334.1083895342@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> What happens with ordering of operations in the ALTER TABLE statement?
> Like if I put an alter TYPE and a SET STORAGE in the same statement
> (wiht commas between), in what order will things happen?

The "right thing" will happen --- in this case, the SET STORAGE will
take effect (before we actually rewrite the table, so the end result
will be exactly what you want). Check out the multiple-pass structure
in commands/tablecmds.c.

> Is it deterministic? Is it documented? Are there situations where a
> crazy collection of 20 commands in a single ALTER TABLE will have
> unpredictable effects?

Yes, no (I did say we needed more docs effort), and I hope not.

> Also, should the syntax be SET TYPE, not just TYPE?

Shrug ... I dunno whether Rod had a precedent for that choice or not.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-07 02:26:13 Re: psql 7.3.4 disagrees with NATURAL CROSS JOIN
Previous Message Christopher Kings-Lynne 2004-05-07 01:50:24 Re: ALTER TABLE TODO items