pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew <matt@ctlno.com>
To: pgsql-general@postgresql.org
To: pgsql-admin@postgresql.org
Subject: Removing NOT NULL Contraint
Date: Wed, 3 May 2000 11:17:24 -0500
Message-ID: <183FA749499ED311B6550000F87E206C0C9163@SRV> (raw)

I may be missing something simple here, but I have an attribute in a
table that was created as NOT NULL.  I now need to remove this
constraint.  I don't see a proper way to do this.  I think I can update
the pg_attribute table and change attnotnull from true to false.  Is
this an acceptable solution or is there a good reason that I should not
directly edit the system tables?

Maybe I'm missing something but I didn't see another way to do it other
then creating a new table, selecting into it and dropping the old table,
which seems like a lot of work for something so simple.

Thanks,

Matt



view thread (3+ messages)  latest in thread

Message-ID: <183FA749499ED311B6550000F87E206C0C9163@SRV>
Permalink:  ../183FA749499ED311B6550000F87E206C0C9163@SRV/
Also on:    postgresql.org/message-id/183FA749499ED311B6550000F87E206C0C9163@SRV

 · 

reply

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: matt@ctlno.com, pgsql-general@postgresql.org
  Subject: Re: Removing NOT NULL Contraint
  In-Reply-To: <183FA749499ED311B6550000F87E206C0C9163@SRV>
  References: <183FA749499ED311B6550000F87E206C0C9163@SRV>

* 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