Re: type conversion discussion - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: type conversion discussion
Date
Msg-id Pine.LNX.4.21.0005152105490.349-100000@localhost.localdomain
Whole thread Raw
In response to Re: type conversion discussion  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: type conversion discussion  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane writes:

> > The fact that an oid is also a number should be an implementation detail.
> 
> Could be.  A version or three ago you actually did have to write
> 
>     ... where oid = 1234::oid
> 
> if you wanted to refer to a specific row by OID.  However, while it
> might be logically purer to insist that OIDs are not numbers, it's just
> too damn handy to be laxer about the distinction.

Definitely. But wouldn't three (or six) extra `=' operators be the road of
least resistance or clearest separation? Not sure.

> I doubt that ordinary users touch OIDs at all, and the ones who do
> probably know what they're doing.

Certain elements around these parts actively advocate using oids for keys
or even unsigned numbers (*shudder*). I wouldn't be so sure about this
statement at all.

One thing to keep in mind in any case is that oids might not be int4-like
forever, eventually we might want int8, or the unsigned version thereof.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Cast of numeric()
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: WAL versus Postgres (or: what goes around, comes ar ound)