Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu [128.42.12.154]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA53034 for ; Sun, 27 Feb 2000 23:36:26 -0500 (EST) (envelope-from reedstrm@wallace.ece.rice.edu) Received: by wallace.ece.rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgresql.org; Sun, 27 Feb 2000 22:36:25 -0600 (CST) Date: Sun, 27 Feb 2000 22:36:25 -0600 From: "Ross J. Reedstrom" To: Seth Banks Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Problems with create table continued... Message-ID: <20000227223625.A5664@rice.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0i In-Reply-To: ; from seth@subimage.com on Sun, Feb 27, 2000 at 07:35:13PM -0800 On Sun, Feb 27, 2000 at 07:35:13PM -0800, Seth Banks wrote: > Anyone see a problem with this code?! Yep - declaring a constaint of "NULL" is not standards compliant SQL: allowing a column to be null _is_ the default in the standard. Just delete the NULL from url, priority and content, and you should be fine. Ross -- Ross J. Reedstrom, Ph.D., NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005 > > CREATE TABLE content ( > content_id serial, > parent_id int4 NOT NULL, > parent_type int4 NOT NULL, > author_id int4 NOT NULL, > title text NOT NULL, > url text NULL, > start_date date NOT NULL, > end_date date NOT NULL, > priority int4 NULL, > content text NULL, > source text NOT NULL > ); > ERROR: parser: parse error at or near "null" > > ************ >