OIDs as object handles?

Поиск
Список
Период
Сортировка
От Dave Trombley
Тема OIDs as object handles?
Дата
Msg-id 3C2EA776.6030108@bumba.net
обсуждение исходный текст
Ответы Re: OIDs as object handles?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Casting Varchar to Numeric
Следующее
От: Tom Lane
Дата:
Сообщение: Re: OIDs as object handles?