Re: NOT NULL

From: elein <elein(at)varlena(dot)com>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: sfpug(at)postgresql(dot)org
Subject: Re: NOT NULL
Date: 2003-10-30 01:27:58
Message-ID: 20031029172758.J28004@cookie.varlena.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

Well, you'll run into problems if there are
any nulls hanging around int the column.
What is the problem with alter table? Or
are you not at that version?

--elein

On Wed, Oct 29, 2003 at 05:20:52PM -0800, David Wheeler wrote:
> Hi All,
>
> Quick question. Is there anything wrong with using this approach to
> turning an existing column into a NOT NULL column?
>
> UPDATE pg_attribute
> SET attnotnull = 't'
> WHERE attname = 'primary_oc__id'
> AND attrelid in (
> SELECT pg_class.oid
> FROM pg_class
> WHERE relkind='r'
> AND relname='element__site'
> )
>
> TIA,
>
> David
>
> --
> David Wheeler AIM: dwTheory
> david(at)kineticode(dot)com ICQ: 15726394
> http://www.kineticode.com/ Yahoo!: dew7e
> Jabber: Theory(at)jabber(dot)org
> Kineticode. Setting knowledge in motion.[sm]

In response to

  • NOT NULL at 2003-10-30 01:20:52 from David Wheeler

Responses

Browse sfpug by date

  From Date Subject
Next Message David Wheeler 2003-10-30 01:33:01 Re: NOT NULL
Previous Message David Wheeler 2003-10-30 01:20:52 NOT NULL