From: Jason Earl <jdearl@yahoo.com>
To: Jayson Callaway <jayson.callaway@iona.com>
To: pgsql-sql@postgresql.org
Subject: Re: changes to table creation syntax in 7.1.2?
Date: Wed, 29 Aug 2001 13:34:47 -0700 (PDT)
Message-ID: <20010829203447.73191.qmail@web10008.mail.yahoo.com> (raw)
In-Reply-To: <9lvc15$1tr7$1@news.tht.net>
It looks like it works here :(. Do you have an error
message?
processdata=# select version();
version
---------------------------------------------------------------
PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by
GCC 2.95.4
(1 row)
processdata=# CREATE TABLE category
processdata-# (
processdata(# uid int4 PRIMARY KEY,
processdata(# description text NOT NULL,
processdata(# parent int4 NULL REFERENCES
category(uid)
processdata(# )
processdata-#
processdata-# ;
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit
index 'category_pkey' for table 'category'
NOTICE: CREATE TABLE will create implicit trigger(s)
for FOREIGN KEY check(s)
CREATE
--- Jayson Callaway <jayson.callaway@iona.com> wrote:
> In postgres 7.0.x I had some working code that
> lookes something like:
>
> CREATE TABLE category
> (
> uid int4 PRIMARY KEY,
> description text NOT NULL,
> parent int4 NULL REFERENCES category(uid)
> )
>
> After upgrading to postgres 7.1.2 however this
> syntax is not accepted
> anymore. I receive an error that says it can not
> create the reference
> because the table category does not exist.
>
> How do I setup this type of reference structure in
> 7.1.2? Did the syntax
> change?
>
> I am running under Linux.
> --
> Jayson Callaway
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jdearl@yahoo.com, jayson.callaway@iona.com
Subject: Re: changes to table creation syntax in 7.1.2?
In-Reply-To: <20010829203447.73191.qmail@web10008.mail.yahoo.com>
* 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