pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOID
10+ messages / 9 participants
[nested] [flat]
* OID
@ 2000-05-01 09:36 Vladimir V. Zolotych <gsmith@eurocom.od.ua>
2000-05-01 15:42 ` Re: OID Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: Vladimir V. Zolotych @ 2000-05-01 09:36 UTC (permalink / raw)
To: pgsql-admin
Hello all,
Forgive me silly question (two of them):
1) Could OID = 0?
2) What happens when OID reaches its upper bound (unsigned int)?
Thanks
--
Vladimir Zolotych gsmith@eurocom.od.ua
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: OID
2000-05-01 09:36 OID Vladimir V. Zolotych <gsmith@eurocom.od.ua>
@ 2000-05-01 15:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 10+ messages in thread
From: Bruce Momjian @ 2000-05-01 15:42 UTC (permalink / raw)
To: Vladimir V. Zolotych <gsmith@eurocom.od.ua>; +Cc: pgsql-admin
[Charset koi8-r unsupported, filtering to ASCII...]
> Hello all,
>
> Forgive me silly question (two of them):
>
> 1) Could OID = 0?
No, zero is an invalid id.
>
> 2) What happens when OID reaches its upper bound (unsigned int)?
It will take decades, we think. Call us when it happens. :-)
Seriously, it is unlikely to happen, so we are not currently concerned
about it. I will add this to the FAQ.
--
Bruce Momjian | http://www.op.net/~candle
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, Pennsylvania 19026
^ permalink raw reply [nested|flat] 10+ messages in thread
* OID
@ 2002-08-16 14:19 Jodi Kanter <jkanter@virginia.edu>
0 siblings, 0 replies; 10+ messages in thread
From: Jodi Kanter @ 2002-08-16 14:19 UTC (permalink / raw)
To: pgsql-admin
Can anyone point me to some documentation on the use of OIDs? Why might I need them? How to remove them in version 7.2? ..etc...
Thanks
Jodi Kanter
_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu
^ permalink raw reply [nested|flat] 10+ messages in thread
* Fw: OID
@ 2002-08-16 20:25 Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:34 ` Re: Fw: OID John Gunther <inbox@bucksvsbytes.com>
2002-08-16 20:40 ` Re: Fw: OID Joe Conway <mail@joeconway.com>
0 siblings, 2 replies; 10+ messages in thread
From: Jodi Kanter @ 2002-08-16 20:25 UTC (permalink / raw)
To: pgsql-admin
Does anyone have a comment on the email below? Is there a general consensus on whether or not to use OIDs with version 7.2?
Thanks
Jodi
----- Original Message -----
From: Jodi Kanter
To: Postgres Admin List
Sent: Friday, August 16, 2002 10:19 AM
Subject: OID
Can anyone point me to some documentation on the use of OIDs? Why might I need them? How to remove them in version 7.2? ..etc...
Thanks
Jodi Kanter
_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
@ 2002-08-16 20:34 ` John Gunther <inbox@bucksvsbytes.com>
1 sibling, 0 replies; 10+ messages in thread
From: John Gunther @ 2002-08-16 20:34 UTC (permalink / raw)
To: ; +Cc: pgsql-admin
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
If you need a unique, arbitrary ID for each record in your tables -- which
is almost always a good thing to have, the OID does the job automatically.
It has the additional benefit of being unique in the entire database. The
only problem I have is if records are imported from other databases, in which
case the OID is changed or at risk of being duplicated. If you assign your
own unique ID you can ensure that merged records preserve their ID. I advise
using the unique ID only internally and never having a user enter or reference
it.<br>
<br>
Jodi Kanter wrote:<br>
<blockquote type="cite"
cite="mid01e701c24563$00413ef0$de138f80@virginia.edu">
<meta content="text/html; charset=iso-8859-1"
http-equiv="Content-Type">
<meta content="MSHTML 5.00.3315.2870" name="GENERATOR">
<style></style>
<div><font face="Times New Roman">Does anyone have a comment on the email
below? Is there a general consensus on whether or not to use OIDs with version
7.2?</font></div>
<div><font face="Times New Roman">Thanks</font></div>
<div><font face="Times New Roman">Jodi</font></div>
<div> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">-----
Original Message -----
<div style="background: rgb(228,228,228) none repeat scroll 0%;"><b>From:</b>
<a href="mailto:jkanter@virginia.edu" title="jkanter@virginia.edu">Jodi
Kanter</a> </div>
<div><b>To:</b> <a href="mailto:pgsql-admin@postgresql.org"
title="pgsql-admin@postgresql.org">Postgres Admin List</a> </div>
<div><b>Sent:</b> Friday, August 16, 2002 10:19 AM</div>
<div><b>Subject:</b> OID</div>
</div>
<div><br>
</div>
<div><font face="Times New Roman">Can anyone point me to some documentation
on the use of OIDs? Why might I need them? How to remove them in version
7.2? ..etc...</font></div>
<div><font face="Times New Roman">Thanks</font></div>
<div><font face="Times New Roman">Jodi Kanter</font></div>
<div>
<div class="Section1">
<p class="MsoNormal"><i><span
style="font-family: Arial; font-size: 9pt;">_______________________________<br>
</span></i><i><span style="font-size: 10pt;">Jodi L Kanter<br>
BioInformatics Database Administrator<br>
University of Virginia<br>
(434) 924-2846<br>
<a href="mailto:jkanter@virginia.edu">jkanter@virginia.edu</a></span></i><span
style="font-family: Arial; font-size: 11pt;"><br style="">
<br style="">
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-family: Arial; font-size: 11pt;"> <o:p></o:p></span></p>
<p class="MsoNormal"><i><span
style="font-family: Arial; font-size: 9pt;"> <o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span
style="font-family: Arial; font-size: 9pt;"> <o:p></o:p></span></i></p>
</div>
</div>
</blockquote>
<br>
</body>
</html>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
@ 2002-08-16 20:40 ` Joe Conway <mail@joeconway.com>
2002-08-18 17:24 ` Re: Fw: OID Daniel L Banta <dan@netcandor.net>
2002-08-19 07:10 ` Re: Fw: OID Jules Alberts <jules.alberts@arbodienst-limburg.nl>
1 sibling, 2 replies; 10+ messages in thread
From: Joe Conway @ 2002-08-16 20:40 UTC (permalink / raw)
To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin
Jodi Kanter wrote:
> Does anyone have a comment on the email below? Is there a general
> consensus on whether or not to use OIDs with version 7.2?
<snip>
>
> Can anyone point me to some documentation on the use of OIDs? Why might
> I need them? How to remove them in version 7.2? ..etc...
I think you're best to avoid using them. They are primarily for internal
system use. If you need an incrementing integer field, create your own
with SERIAL, or integer field and a sequence.
To create a table without oids, see:
http://www.postgresql.org/idocs/index.php?sql-createtable.html
Joe
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:40 ` Re: Fw: OID Joe Conway <mail@joeconway.com>
@ 2002-08-18 17:24 ` Daniel L Banta <dan@netcandor.net>
1 sibling, 0 replies; 10+ messages in thread
From: Daniel L Banta @ 2002-08-18 17:24 UTC (permalink / raw)
To: pgsql-admin
Jodi,
> How to remove them in version 7.2?
Create the table using WITHOUT OIDS.
Example.
CREATE TABLE users (
user_id serial NOT NULL,
user_name varchar(20) NOT NULL,
passwd varchar(32) NOT NULL,
CONSTRAINT pk_user_id PRIMARY KEY(user_id)
) WITHOUT OIDS;
Take Care.
Dan
----- Original Message -----
From: "Joe Conway" <mail@joeconway.com>
To: "Jodi Kanter" <jkanter@virginia.edu>
Cc: "Postgres Admin List" <pgsql-admin@postgresql.org>
Sent: Friday, August 16, 2002 16.40
Subject: Re: [ADMIN] Fw: OID
> Jodi Kanter wrote:
> > Does anyone have a comment on the email below? Is there a general
> > consensus on whether or not to use OIDs with version 7.2?
>
> <snip>
>
> >
> > Can anyone point me to some documentation on the use of OIDs? Why might
> > I need them? How to remove them in version 7.2? ..etc...
>
> I think you're best to avoid using them. They are primarily for internal
> system use. If you need an incrementing integer field, create your own
> with SERIAL, or integer field and a sequence.
>
> To create a table without oids, see:
> http://www.postgresql.org/idocs/index.php?sql-createtable.html
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:40 ` Re: Fw: OID Joe Conway <mail@joeconway.com>
@ 2002-08-19 07:10 ` Jules Alberts <jules.alberts@arbodienst-limburg.nl>
2002-08-19 14:51 ` Re: Fw: OID Curt Sampson <cjs@cynic.net>
1 sibling, 1 reply; 10+ messages in thread
From: Jules Alberts @ 2002-08-19 07:10 UTC (permalink / raw)
To: pgsql-admin; +Cc: pgsql-admin
On 16 Aug 2002 at 13:40, Joe Conway wrote:
> Jodi Kanter wrote:
> > Does anyone have a comment on the email below? Is there a general
> > consensus on whether or not to use OIDs with version 7.2?
>
> <snip>
>
> >
> > Can anyone point me to some documentation on the use of OIDs? Why
> > might I need them? How to remove them in version 7.2? ..etc...
>
> I think you're best to avoid using them. They are primarily for internal
> system use. If you need an incrementing integer field, create your own
> with SERIAL, or integer field and a sequence.
Is there any consensus aboit avoiding OIDs? I'm running a small test
system right now using OIDs as a means to refer to BLOBs. Should I
expect any trouble using OIDs in our future production system?
TIA!
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:40 ` Re: Fw: OID Joe Conway <mail@joeconway.com>
2002-08-19 07:10 ` Re: Fw: OID Jules Alberts <jules.alberts@arbodienst-limburg.nl>
@ 2002-08-19 14:51 ` Curt Sampson <cjs@cynic.net>
2002-08-19 15:04 ` Re: Fw: OID Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 10+ messages in thread
From: Curt Sampson @ 2002-08-19 14:51 UTC (permalink / raw)
To: Jules Alberts <jules.alberts@arbodienst-limburg.nl>; +Cc: pgsql-admin
On Mon, 19 Aug 2002, Jules Alberts wrote:
> Is there any consensus aboit avoiding OIDs? I'm running a small test
> system right now using OIDs as a means to refer to BLOBs. Should I
> expect any trouble using OIDs in our future production system?
I don't know if there's a consensus, but I certainly avoid using OIDs
completely in my own tables. They're can wrap, for a start, so in a
really busy, large database you might end up getting one that you
already have. Also, I don't like "hidden" fields; if I'm going to refer
to soemething, I like it to be nice and obvious what's being referred
to. And of course they're not portable.
cjs
--
Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Fw: OID
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:40 ` Re: Fw: OID Joe Conway <mail@joeconway.com>
2002-08-19 07:10 ` Re: Fw: OID Jules Alberts <jules.alberts@arbodienst-limburg.nl>
2002-08-19 14:51 ` Re: Fw: OID Curt Sampson <cjs@cynic.net>
@ 2002-08-19 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 10+ messages in thread
From: Tom Lane @ 2002-08-19 15:04 UTC (permalink / raw)
To: Curt Sampson <cjs@cynic.net>; +Cc: Jules Alberts <jules.alberts@arbodienst-limburg.nl>; pgsql-admin
Curt Sampson <cjs@cynic.net> writes:
> On Mon, 19 Aug 2002, Jules Alberts wrote:
>> Is there any consensus aboit avoiding OIDs? I'm running a small test
>> system right now using OIDs as a means to refer to BLOBs. Should I
>> expect any trouble using OIDs in our future production system?
> I don't know if there's a consensus, but I certainly avoid using OIDs
> completely in my own tables. They're can wrap, for a start, so in a
> really busy, large database you might end up getting one that you
> already have. Also, I don't like "hidden" fields; if I'm going to refer
> to soemething, I like it to be nice and obvious what's being referred
> to. And of course they're not portable.
As far as using BLOBs goes, you don't have a lot of choice: the lo_xxx
family of functions take and return OID, end of story. Of course
Postgres' notion of a BLOB isn't very portable anyway.
I do agree that for a primary key in a user table, there's no very good
reason to use OIDs rather than using a SERIAL field (ie, a sequence).
regards, tom lane
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2002-08-19 15:04 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-05-01 09:36 OID Vladimir V. Zolotych <gsmith@eurocom.od.ua>
2000-05-01 15:42 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-08-16 14:19 OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:25 Fw: OID Jodi Kanter <jkanter@virginia.edu>
2002-08-16 20:34 ` John Gunther <inbox@bucksvsbytes.com>
2002-08-16 20:40 ` Joe Conway <mail@joeconway.com>
2002-08-18 17:24 ` Daniel L Banta <dan@netcandor.net>
2002-08-19 07:10 ` Jules Alberts <jules.alberts@arbodienst-limburg.nl>
2002-08-19 14:51 ` Curt Sampson <cjs@cynic.net>
2002-08-19 15:04 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox