NOT NULL

From: David Wheeler <david(at)kineticode(dot)com>
To: sfpug(at)postgresql(dot)org
Subject: NOT NULL
Date: 2003-10-30 01:20:52
Message-ID: 4D7F8F59-0A77-11D8-B4BC-0003931A964A@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: sfpug

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]

Responses

Browse sfpug by date

  From Date Subject
Next Message elein 2003-10-30 01:27:58 Re: NOT NULL
Previous Message Sudhakar Avula 2003-10-29 23:13:27 AIX