X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id F1B7D9DC85B for ; Mon, 13 Mar 2006 09:05:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38135-02 for ; Mon, 13 Mar 2006 09:05:09 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 7AA869DC82A for ; Mon, 13 Mar 2006 09:05:04 -0400 (AST) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.com [194.25.134.80]) by svr4.postgresql.org (Postfix) with ESMTP id 9A8155AF0BB for ; Mon, 13 Mar 2006 13:05:08 +0000 (GMT) Received: from fwd31.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1FImjN-0005nb-03; Mon, 13 Mar 2006 14:05:01 +0100 Received: from noisy.spielwiese.de (XRa3YaZareMlszbI2BBsEubfAhZYqrlezyhI9W2Lvk3VANGQ6PzIZi@[84.152.203.198]) by fwd31.sul.t-online.de with esmtp id 1FImj5-2EyISm0; Mon, 13 Mar 2006 14:04:43 +0100 Received: from noisy.spielwiese.de (localhost.localdomain [127.0.0.1]) by noisy.spielwiese.de (8.13.4/8.13.4) with ESMTP id k2DD73BB020477 for ; Mon, 13 Mar 2006 14:07:05 +0100 Message-Id: <200603131307.k2DD73BB020477@noisy.spielwiese.de> To: pgsql-sql@postgresql.org Subject: removing "not null" modifier Date: Mon, 13 Mar 2006 14:07:03 +0100 From: Robert Urban X-ID: XRa3YaZareMlszbI2BBsEubfAhZYqrlezyhI9W2Lvk3VANGQ6PzIZi@t-dialin.net X-TOI-MSGID: cf767bbc-466f-4603-8665-cecbc9bab42b X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.001 required=5 tests=[UNPARSEABLE_RELAY=0.001] X-Spam-Score: 0.001 X-Spam-Level: X-Archive-Number: 200603/185 X-Sequence-Number: 24531 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 REFERENCES status(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