Are these two creation commands functionally identical?
От | dterrors@hotmail.com |
---|---|
Тема | Are these two creation commands functionally identical? |
Дата | |
Msg-id | 1186692906.701407.154540@z24g2000prh.googlegroups.com обсуждение исходный текст |
Ответы |
Re: Are these two creation commands functionally
identical?
|
Список | 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 по дате отправления: