Re: oid and oidvector
От | Bruce Momjian |
---|---|
Тема | Re: oid and oidvector |
Дата | |
Msg-id | 200204152039.g3FKdhL21970@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: oid and oidvector (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: oid and oidvector
|
Список | pgsql-sql |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > No, you can't use oid as a foreign key. You must use a PRIMARY column. > > Oh? > > regression=# create table foo(f1 int); > CREATE > regression=# create unique index fooi on foo(oid); > CREATE > regression=# create table bar (ref oid references foo(oid)); > NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) > CREATE > regression=# > > I agree with the advice *not* to do this, but that doesn't mean it can't > be done. Oh, oh, TODO has: * Allow oid to act as a foreign key So I should mark the item as completed? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-sql по дате отправления: