From: | Thomas Lockhart <lockhart(at)fourpalms(dot)org> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Doug McNaught <doug(at)wireboard(dot)com>, Philip Warner <pjw(at)rhyme(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: SET NULL / SET NOT NULL |
Date: | 2002-02-21 02:40:36 |
Message-ID: | 3C745E24.94B34DC5@fourpalms.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
(our mail crossed in the ether...)
> Let's say, theoretically, that in the future we want to allow people to
> change the type of their columns, plus allow them to change the nullability.
Right.
> Should we come up with a syntax for changing nullability that allows for the
> future changing of column type? If so, then a syntaxes like these might be
> the way to go:
Yup.
> If we just allow the full col spec we could one day support this:
> ALTER TABLE blah ALTER COLUMN col text boolean NOT NULL DEFAULT 'f';
> Which would change the column to that definition (if coercion is possible)
> no matter what current definition is...
Right. No point in *precluding* that with a short-sighted choice of
syntax.
> Is this the eventual goal? Will this cause shift/reduce errors? will we
> need to put the word 'SET' in after 'col'?
Probably not, if we can already do this with CREATE TABLE.
And if we head this direction, then choosing a syntax which most closely
mimics the current CREATE TABLE will allow altering two columns at once,
which would be more efficient presumably than doing one column at a
time.
- Thomas
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-02-21 02:54:51 | elog() proposal |
Previous Message | Sean Chittenden | 2002-02-21 02:39:19 | Re: A Replication Idea |