By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,374 Members | 2,014 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,374 IT Pros & Developers. It's quick & easy.

OID and PK/FK KEYS

P: n/a
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
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
<ki**********@freemail.it> wrote:
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

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.