removing "not null" modifier - Mailing list pgsql-sql

From Robert Urban
Subject removing "not null" modifier
Date
Msg-id 200603131307.k2DD73BB020477@noisy.spielwiese.de
Whole thread Raw
Responses Re: removing "not null" modifier
List pgsql-sql
Hello,

let's say I have created a postgresql-7.2.2 db using the following cmds:
CREATE TABLE status(    id SERIAL NOT NULL PRIMARY KEY,    name VARCHAR(32));
CREATE TABLE event(    id SERIAL NOT NULL PRIMARY KEY,    description VARCHAR(32),    status_id  INTEGER NOT NULL
REFERENCESstatus(id));
 

in psql I then see:

mydb=# \d event                                    Table "event"  Column    |         Type          |
Modifiers                     
 
-------------+-----------------------+--------------------------------------------------id          | integer
   | not null default nextval('"event_id_seq"'::text)description | character varying(32) | status_id   | integer
      | not null
 
Primary key: event_pkey
Triggers: RI_ConstraintTrigger_43210


The question:

how can I get rid of the "not null" modifier on status_id?  

thanks,

Robert Urban


pgsql-sql by date:

Previous
From: Markus Schaber
Date:
Subject: Re: Set generating functions and subqueries
Next
From: Achilleus Mantzios
Date:
Subject: Re: removing "not null" modifier