Re: SET NULL / SET NOT NULL

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "Doug McNaught" <doug(at)wireboard(dot)com>
Cc: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SET NULL / SET NOT NULL
Date: 2002-02-21 03:21:18
Message-ID: 3.0.5.32.20020221142118.0361f860@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 10:28 21/02/02 +0800, Christopher Kings-Lynne wrote:
>
>ALTER TABLE blah ALTER COLUMN col DROP DEFAULT;
>ALTER TABLE blah ALTER COLUMN col SET DEFAULT 't';
>ALTER TABLE blah ALTER COLUMN col NULL;
>ALTER TABLE blah ALTER COLUMN col NOT NULL;
>ALTER TABLE blah ALTER COLUMN col varchar(50);
>ALTER TABLE blah ALTER COLUMN col int4 NULL;
>ALTER TABLE blah ALTER COLUMN col text NOT NULL;

Looks good.

>will we need to put the word 'SET' in after 'col'?

The spec only uses SET for the DEFAULT clause.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-02-21 03:27:40 test
Previous Message Philip Warner 2002-02-21 03:18:19 Re: SET NULL / SET NOT NULL