Re: SET NULL / SET NOT NULL

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: SET NULL / SET NOT NULL
Дата
Msg-id GNELIHDDFBOCMGBFGEFOCENHCBAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: SET NULL / SET NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Where to get official SQL spec (was Re: Domain Support)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Problem with reloading groups in pg_hba.conf