Skip site navigation (1) Skip section navigation (2)

Re: Oid and Oid Vector

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Camila Rocha <camilarrocha(at)hotmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Oid and Oid Vector
Date: 2002-04-15 13:20:21
Message-ID: 20020415132021.GA12893@cc.usu.edu (view raw or flat)
Thread:
Lists: pgsql-docspgsql-general
On Sat, Apr 13, 2002 at 12:58:37PM -0700, Camila Rocha wrote:
> Hi!

Oi :-)
 
> I'd like to know why the field Oid can't be used as a foreign key. And

oid is for PostgreSQL internal use, and AFAIK not meant to have other
semantic meaning applied to it. oid's change when you restore backups for
example, probably not a good thing for your application.

Just create id attributes in your tables. Make them of type int or int8 or
serial depending on your needs.

> more information about the type oidvector. What is
> it??????????????????? I can't find information about it anywhere.

Honestly I don't know.
 
> I'm asking these questions because i wanted to use the oid field as
> primary key of may tables, and relate them using the oid too. I i
> wanted to use the oidvector for this kind of things too.

What did you want to do with oidvectors?

-Roberto

P.S.: Next time don't send this type of questions to the -docs list, which
is for documentation discussions. The -general (which you seem to have
cross-posted to) or the -sql list seem more appropriate. 

-- 
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ 
       http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer    

In response to

pgsql-docs by date

Next:From: Roberto MelloDate: 2002-04-15 15:13:01
Subject: Re: documentation for joins
Previous:From: Vince VielhaberDate: 2002-04-15 11:42:03
Subject: Copyright notice

pgsql-general by date

Next:From: Marin DimitrovDate: 2002-04-15 13:22:09
Subject: Re: How do I list all users and all databases.
Previous:From: Nigel J. AndrewsDate: 2002-04-15 13:18:29
Subject: Re: How do I list all users and all databases.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group