removing a restriction

Started by Tom Allisonalmost 19 years ago4 messagesgeneral
Jump to latest
#1Tom Allison
tom@tacocat.net

I have a column that was created with a 'not null' restriction.
How do I remove it?

#2Joshua D. Drake
jd@commandprompt.com
In reply to: Tom Allison (#1)
Re: removing a restriction

Tom Allison wrote:

I have a column that was created with a 'not null' restriction.
How do I remove it?

alter table set

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

#3Tom Allison
tom@tacocat.net
In reply to: Joshua D. Drake (#2)
Re: removing a restriction

alter TABLE user_history ALTER COLUMN seen_as set not null;

turns it on...
I want to turn it off....

On May 30, 2007, at 9:05 PM, Joshua D. Drake wrote:

Show quoted text

Tom Allison wrote:

I have a column that was created with a 'not null' restriction.
How do I remove it?

alter table set

---------------------------(end of
broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/
donate
PostgreSQL Replication: http://www.commandprompt.com/products/

---------------------------(end of
broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

#4Joshua D. Drake
jd@commandprompt.com
In reply to: Tom Allison (#3)
Re: removing a restriction

Tom Allison wrote:

alter TABLE user_history ALTER COLUMN seen_as set not null;

turns it on...
I want to turn it off....

DROP NOT NULL;

On May 30, 2007, at 9:05 PM, Joshua D. Drake wrote:

Tom Allison wrote:

I have a column that was created with a 'not null' restriction.
How do I remove it?

alter table set

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/

--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/