Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Problems with create table continued...

From: "Ross J(dot) Reedstrom" <reedstrm(at)wallace(dot)ece(dot)rice(dot)edu>
To: Seth Banks <seth(at)subimage(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Problems with create table continued...
Date: 2000-02-28 04:36:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
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 J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)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"
> ************

In response to

pgsql-sql by date

Next:From: Vikrant RathoreDate: 2000-02-28 05:40:21
Subject: SQL query problem
Previous:From: Tom LaneDate: 2000-02-28 04:29:19
Subject: Re: [SQL] Problems with create table continued...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group