From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SET NULL / SET NOT NULL |
Date: | 2002-03-22 06:15:35 |
Message-ID: | GNELIHDDFBOCMGBFGEFOCENHCBAA.chriskl@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Seems one keyword shy of a load; I'd prefer
>
> ALTER TABLE blah ALTER COLUMN col SET TYPE int4;
>
> Otherwise, every keyword that might appear after SET will have to be
> fully reserved (else it couldn't be distinguished from a type name).
I like that...
So would you then envisage something like this:
ALTER TABLE blah ALTER COLUMN col SET TYPE int4 DEFAULT 3 NOT NULL;
or
ALTER TABLE blah ALTER COLUMN col SET DEFAULT 3 TYPE int4 NULL;
etc.
ie. Order wouldn't matter and you could do them all at once for convenience?
This seems like a cool idea to me.
Problem with all this, of course, is that it's different to everyone else's
syntax, but then they're all different to each other. There's no standard
for it, but if there's a new standard - I wonder what they would specify?
Since altering a column is a not oft used operation, I would expect that the
punters wouldn't have a problem looking in the docs for how to do it, for
each different DBMS they use...
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-03-22 06:27:23 | Re: SET NULL / SET NOT NULL |
Previous Message | Thomas Lockhart | 2002-03-22 06:01:21 | Re: Where to get official SQL spec (was Re: Domain Support) |