OIDs as object handles? - Mailing list pgsql-general

From Dave Trombley
Subject OIDs as object handles?
Date
Msg-id 3C2EA776.6030108@bumba.net
Whole thread Raw
Responses Re: OIDs as object handles?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
    Greetings!

        There is a particular feature I find myself wanting:  Given a
table row, I'd like a handle to that row in storage so that I may access
it again quickly (ie. without the overhead of a SELECT).  I was
originally under the impression that the oid would suffice for this
purpose, but I encountered some documentation which indicated that oid
numbers might not be unique in a given table, so it seems this
functionality could not be present after all.

        Also, could someone explain the following (possibly related)
error?  My syntax may be completely off, but I'm trying to do just what
I describe above:

test=# CREATE TABLE foo (a int, b int);
CREATE
test=# CREATE TABLE bar (c foo, d, int);
CREATE
test=# INSERT INTO foo VALUES(3,4);
INSERT 19839 1
test=# INSERT INTO bar VALUES(19839::foo, 6);
INSERT 19840 1
test=# SELECT bar.c.a FROM bar;
ERROR:   fmgr_info: function 19839: cache lookup failed

    Cheers,
        dj trombley
        <dtrom@bumba.net>


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Casting Varchar to Numeric
Next
From: Tom Lane
Date:
Subject: Re: OIDs as object handles?