From: Bob Smith <bsmith@h-e.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Changing NOT NULL condition on column
Date: Tue, 20 May 2003 16:40:34 -0700
Message-ID: <734BFEFD-8B1C-11D7-AAB1-0003933DD370@h-e.com> (raw)
I need to change the not-null restriction on some columns in a table,
and this doesn't seem to be possible with ALTER TABLE. Is it safe to
connect as superuser and update pg_attribute.attnotnull directly? Or
is there a different way to do this, other than dropping/re-creating
the whole table?
I'm currently running 7.2.3, but will be upgrading soon so I'd like to
know if this would work with 7.3 as well.
Thanks!
Bob Smith
Hammett & Edison, Inc.
bsmith@h-e.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bsmith@h-e.com
Subject: Re: Changing NOT NULL condition on column
In-Reply-To: <734BFEFD-8B1C-11D7-AAB1-0003933DD370@h-e.com>
References: <734BFEFD-8B1C-11D7-AAB1-0003933DD370@h-e.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox