dbTalk Databases Forums  

OID and PK/FK KEYS

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss OID and PK/FK KEYS in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Raffaele Spizzuoco
 
Posts: n/a

Default OID and PK/FK KEYS - 10-19-2004 , 09:54 AM






Hi!

I'm from Italy, and sorry about my english...
I have a question that I know it is already said in the groups but I
have however some doubts
I have seen it is technically possible to use OID as PRIMARY KEY and
as FOREIGN KEY but it is correct to do so for the database's logical
integrity?
Is it better I use in any case other keys and not oid to avoid the
possible wraparound? or the wraparound is an extreme case and so I can
use quietly OID as PRIMARY and FOREIGN KEY?

Thanks

Reply With Quote
  #2  
Old   
Kevin Barnard
 
Posts: n/a

Default Re: OID and PK/FK KEYS - 10-20-2004 , 03:59 PM






A better solution is to use the serial data type. OID is depreciated
and may go away.

http://www.postgresql.org/docs/7.4/s...ATATYPE-SERIAL

On 19 Oct 2004 07:54:36 -0700, Raffaele Spizzuoco
<kilomegabyte (AT) freemail (DOT) it> wrote:
Quote:
Hi!

I'm from Italy, and sorry about my english...
I have a question that I know it is already said in the groups but I
have however some doubts
I have seen it is technically possible to use OID as PRIMARY KEY and
as FOREIGN KEY but it is correct to do so for the database's logical
integrity?
Is it better I use in any case other keys and not oid to avoid the
possible wraparound? or the wraparound is an extreme case and so I can
use quietly OID as PRIMARY and FOREIGN KEY?

Thanks

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.