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

Re: foreign keys - script

From: mikeo <mikeo(at)spectrumtelecorp(dot)com>
To: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>, "PGSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: foreign keys - script
Date: 2000-08-29 18:15:18
Message-ID: 3.0.1.32.20000829141518.00941b20@pop.spectrumtelecorp.com (view raw or flat)
Thread:
Lists: pgsql-general
i created my foreign keys afterwards using a statement like this:

Alter table web_hits add constraint fk_webh_wu_id 
            foreign key (wu_id) references web_users(wu_id);

HTH
  mikeo

At 01:12 PM 8/29/00 -0400, Adam Lang wrote:
>I'm also having a problem with my references.
>
>In the script below, I get this error after each references statement: 
>NOTICE:  CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented
>
>Any ideas?
>
>drop table model_part;
>drop table models;
>drop table parts;
>drop table category;
>drop sequence model_part_model_part_id_seq;
>
>create table category (
>        category_id char(5) primary key,
>        name varchar(20));
>
>create table parts (
>        part_id char(10) primary key,
>        category_id char(5) references category
>                on delete cascade,
>        name varchar(20),
>        price numeric(7,2));
>
>create table models (
>        model_id char(10) primary key,
>        name varchar(20),
>        description text);
>
>create table model_part (
>        model_part_id serial,
>        part_id char(10) references parts
>                on delete cascade,
>        model_id char(10) references models
>                on delete cascade);
>
>Adam Lang
>Systems Engineer
>Rutgers Casualty Insurance Company
>

In response to

pgsql-general by date

Next:From: Lamar OwenDate: 2000-08-29 18:17:25
Subject: Re: 7.1 Release Date
Previous:From: funk101Date: 2000-08-29 18:06:30
Subject: lo_import

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