Re: oid and oidvector - Mailing list pgsql-sql

From Bruce Momjian
Subject Re: oid and oidvector
Date
Msg-id 200204151913.g3FJDTi10516@candle.pha.pa.us
Whole thread Raw
In response to oid and oidvector  ("Camila Rocha" <camilarrocha@hotmail.com>)
Responses Re: oid and oidvector  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Camila Rocha wrote:
> Hi!
> 
> I'm from Brazil, and sorry about my english...
> I'm having problems with the oid field, the field present in all tables. I 
> wanted to use it as a foreing key betwwen too tables, but i couldn't! is it 
> possible??

No, you can't use oid as a foreign key.  You must use a PRIMARY column.

> what about the data type oidvector?? i didn't find any documentation about 
> it, i wanted to use it to keep a lot of oids of other objects... like an 
> array of foreign keys, you know?

oidvector is for internal db use.  It is an array of 16 oid's.

--  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 by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: data order problem
Next
From: Bjarte Aagnes
Date:
Subject: MAX(column1),MAX(column2),...