Are these two creation commands functionally identical? - Mailing list pgsql-general

From dterrors@hotmail.com
Subject Are these two creation commands functionally identical?
Date
Msg-id 1186692906.701407.154540@z24g2000prh.googlegroups.com
Whole thread Raw
Responses Re: Are these two creation commands functionally identical?  (Ragnar <gnari@hive.is>)
List pgsql-general
I want to to know if these two are functionally equivalent.  Is this:

Create table "users"
(
    "userid" BigSerial NOT NULL,
    "name" Varchar(20),
 primary key ("userid")
) Without Oids;
Create table "sales"
(
    "saleid" BigSerial NOT NULL,
    "userid" Bigint NOT NULL,
    "parent_saleid" Bigint NOT NULL,
 primary key ("saleid")
) Without Oids;
Alter table "sales" add  foreign key ("userid") references
"users" ("userid") on update restrict on delete restrict;
Alter table "sales" add  foreign key ("parent_saleid") references
"sales" ("saleid") on update restrict on delete restrict;

Is the above functionally identical to:

Create table "users"
(
    "userid" BigSerial NOT NULL,
    "name" Varchar(20),
 primary key ("userid")
) Without Oids;
Create table "sales"
(
    "saleid" BigSerial NOT NULL,
    "userid" bigint references users(userid),
    "parent_saleid" bigint references sales(saleid),
 primary key ("saleid")
) Without Oids;

Using postgreSQL 8.1 if it matters, thanks.


pgsql-general by date:

Previous
From: Johan Runnedahl
Date:
Subject: Installing Postgresql 8.2 on Windows Vista
Next
From: Adam Endicott
Date:
Subject: Confusing performance of specific query