Re: Foreign keys - Mailing list pgsql-general

From Devrim GUNDUZ
Subject Re: Foreign keys
Date
Msg-id Pine.LNX.4.44.0204221607190.830-100000@oper.metu.edu.tr
Whole thread Raw
In response to Foreign keys  ("Jacob Vennervald Madsen" <jvm@gopinocchio.com>)
Responses Re: Foreign keys
List pgsql-general
Hi,

On Mon, 22 Apr 2002, Jacob Vennervald Madsen wrote:

> CREATE TABLE "alarm_schedule" (
>    "alarm_schedule_id" SERIAL NOT NULL,
>    "day_of_week" int2 NOT NULL,
>    "user_id" int4 NOT NULL,
>    "send_email" bool NOT NULL,
>    "send_sms" bool NOT NULL,
>    PRIMARY KEY ("alarm_schedule_id"),
>    FOREIGN KEY "user_id" REFERENCES smartlight_user ("user_id")
> );

This works:

CREATE TABLE "alarm_schedule" (
   "alarm_schedule_id" SERIAL NOT NULL,
   "day_of_week" int2 NOT NULL,
   "user_id" int4 NOT NULL,
   "send_email" bool NOT NULL,
   "send_sms" bool NOT NULL,
   PRIMARY KEY ("alarm_schedule_id"),
   FOREIGN KEY ("user_id") REFERENCES smartlight_user(user_id)
);


Just a parenthesis ;)

Best regards.

--

Devrim GUNDUZ

devrim@oper.metu.edu.tr
devrim.gunduz@linux.org.tr
devrimg@tr.net

Web : http://devrim.oper.metu.edu.tr
------------------------------------------------------------------



pgsql-general by date:

Previous
From: "Jacob Vennervald Madsen"
Date:
Subject: Foreign keys
Next
From: "Nigel J. Andrews"
Date:
Subject: OT: Re: configure: error: header file is required for OpenSSL