Thread: OID

OID

From
"Chris Boget"
Date:
Could someone explain what this is and what it's used
for?  Going through the iDocs, I see that it's short for
Object Identifier.  But I never saw a clear explanation of
what it is/used for.

thnx,
Chris


Re: OID

From
Manfred Koizar
Date:
On Mon, 20 Jan 2003 08:28:22 -0600, "Chris Boget" <chris@wild.net>
wrote:
>Could someone explain what this is

A database wide 32 bit identifier, automatically assigned to each new
tuple, unless you created the table WITHOUT OIDS or (as of 7.3) you
created the table by CREATE TABLE AS ...  (see recent discussion on
-hackers: "default to WITHOUT OIDS").  OID is not guaranteed to be
unique, because it can roll over, and its use as a PK for user tables
is discouraged.

> and what it's used for?

It's heavily used for identifying internal objects.  For user tables
it is only overhead, unless you make explicit use of it.

Servus
 Manfred

Re: OID

From
"Chris Boget"
Date:
> > and what it's used for?
> It's heavily used for identifying internal objects.  For user tables
> it is only overhead, unless you make explicit use of it.

How do you make use of it?  What benefits does using OID provide?

Chris


Re: OID

From
Manfred Koizar
Date:
On Mon, 20 Jan 2003 09:53:38 -0600, "Chris Boget" <chris@wild.net>
wrote:
>How do you make use of it?

My opinon: Don't use it.

>What benefits does using OID provide?

None that I know of.

Servus
 Manfred

Re: OID

From
Tom Lane
Date:
Manfred Koizar <mkoi-pg@aon.at> writes:
> On Mon, 20 Jan 2003 09:53:38 -0600, "Chris Boget" <chris@wild.net>
> wrote:
>> How do you make use of it?
> My opinon: Don't use it.
>> What benefits does using OID provide?
> None that I know of.

See the discussion on this page:

http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/datatype-oid.html

which basically says "OIDs are best used only for references to system
tables".

            regards, tom lane

Re: OID

From
Michelle Konzack
Date:
Hello Chris,

Am 08:28 2003-01-20 -0600 hat Chris Boget geschrieben:
>
>Could someone explain what this is and what it's used
>for?  Going through the iDocs, I see that it's short for
>Object Identifier.  But I never saw a clear explanation of
>what it is/used for.

Read: O'Reilly (Practical PostgreSQL) Page 87  ;-))

----------------------------------------------------------------------
On  table management concern can be how to distinguish between two rows
whose collumn values are identical. A very useful PostgreSQL feature is
that every row has its own 'object identifier' number, or OID, which is
unique within that table. In other words, no two rows within the same
table should ever have the same OID. This means that even if a table
were designed in such a way that two rows might be identical, there is
still a programmatic way to discern between them: through the OID.
----------------------------------------------------------------------

I hope this helps
Michelle


Re: OID

From
Michelle Konzack
Date:
Hello Tom,

Am 15:52 2003-01-20 -0500 hat Tom Lane geschrieben:

>See the discussion on this page:
>
>http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/datatype-oi
d.html
>
>which basically says "OIDs are best used only for references to system
>tables".

I use the OID's on my 80 GByte Datebase very heavy...
Without it I am realy f...ed !!!

Michelle