From: Ross J. Reedstrom <reedstrm@wallace.ece.rice.edu>
To: Seth Banks <seth@subimage.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Problems with create table continued...
Date: Sun, 27 Feb 2000 22:36:25 -0600
Message-ID: <20000227223625.A5664@rice.edu> (raw)
In-Reply-To: <NOEPJACOBMIOEOLHKIODGEGDCBAA.seth@subimage.com>
References: <NOEPJACOBMIOEOLHKIODGEGDCBAA.seth@subimage.com>
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., <reedstrm@rice.edu>
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"
>
> ************
>
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-sql@postgresql.org
Cc: reedstrm@wallace.ece.rice.edu, seth@subimage.com
Subject: Re: [SQL] Problems with create table continued...
In-Reply-To: <20000227223625.A5664@rice.edu>
References: <NOEPJACOBMIOEOLHKIODGEGDCBAA.seth@subimage.com> <20000227223625.A5664@rice.edu>
* 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