Re: Modifying NOT NULL Constraint

Поиск
Список
Период
Сортировка
От Dan Wilson
Тема Re: Modifying NOT NULL Constraint
Дата
Msg-id 014a01bfd5c8$3ab0bd20$db7dfea9@dwilson
обсуждение исходный текст
Ответ на Modifying NOT NULL Constraint  ("Dan Wilson" <phpPgAdmin@acucore.com>)
Список pgsql-hackers
So if I'm understanding this correctly, this would be able to remove the NOT
NULL constraint, but would not be able to set the NOT NULL constraint.  Is
that correct?

If that is correct, are their plans to implement a post-create setting of
the NOT NULL constraint?

-Dan

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Dan Wilson" <phpPgAdmin@acucore.com>
Cc: <pgsql-hackers@postgresql.org>
Sent: Tuesday, June 13, 2000 10:33 PM
Subject: Re: [HACKERS] Modifying NOT NULL Constraint


> "Dan Wilson" <phpPgAdmin@acucore.com> writes:
> > this was posed as a solutions to modifying the NOT NULL constraint:
> >> update pg_attributes set attnotnull = 'f' where oid =
oidofnotnullcolumn;
> >> vacuum analyze;
>
> attnotnull is where the gold is hidden, all right.  The 'vacuum analyze'
> step is mere mumbo-jumbo --- there's no need for that.
>
> > Are there any side effects of which I should be aware before attempting
to
> > use this?
>
> Changing in that direction should be safe enough.  Turning attnotnull
> *on* is a little more dubious, since it won't magically make any
> existing null entries in the column go away.  attnotnull just governs
> the check that prevents you from storing new nulls.
>
> regards, tom lane



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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Re: Big 7.1 open items
Следующее
От: Niall Smart
Дата:
Сообщение: Re: 7.0.2 cuts off attribute name