pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: eladio rodriguez <elarod_ad@hotmail.com>
To: bsmith@h-e.com
To: pgsql-admin@postgresql.org
Subject: Re: Changing NOT NULL condition on column
Date: Sat, 24 May 2003 10:31:02 -0600
Message-ID: <Law14-F94OKS31JRC1s00001317@hotmail.com> (raw)

saludos.

en 7.3:
ALTER TABLE [ ONLY ] table [ * ]
    ALTER [ COLUMN ] column { SET | DROP } NOT NULL

en 7.2 no funciona.
tendrias que drop la columna y recrearla.


>From: Bob Smith <bsmith@h-e.com>
>To: pgsql-admin <pgsql-admin@postgresql.org>
>Subject: [ADMIN] Changing NOT NULL condition on column
>Date: Tue, 20 May 2003 16:40:34 -0700
>
>
>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
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster

_________________________________________________________________
Charla con tus amigos en lĂ­nea mediante MSN Messenger: 
http://messenger.yupimsn.com/




view thread (3+ messages)

Message-ID: <Law14-F94OKS31JRC1s00001317@hotmail.com>
Permalink:  ../Law14-F94OKS31JRC1s00001317@hotmail.com/
Also on:    postgresql.org/message-id/Law14-F94OKS31JRC1s00001317@hotmail.com

 · 

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: elarod_ad@hotmail.com, bsmith@h-e.com
  Subject: Re: Changing NOT NULL condition on column
  In-Reply-To: <Law14-F94OKS31JRC1s00001317@hotmail.com>
  References: <Law14-F94OKS31JRC1s00001317@hotmail.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