How do I find the table that an oid belongs to

Поиск
Список
Период
Сортировка
От Roland Roberts
Тема How do I find the table that an oid belongs to
Дата
Msg-id x6ww8m3g9k.fsf@tycho.rlent.pnet
обсуждение исходный текст
Список pgsql-hackers
I'm trying to get Keystone (http://www.stonekeep.com/) to work and
have to emulate some MySQL functions.  One of these is the ability to
return the value of a column that is an auto-increment column after a
row was inserted, updated, or deleted.  The interface I have to work
with is PHP.  PHP has a function, pg_getlastoid, that lets me find the
oid of the last insert, update, or delete.  I've looked at psql.c to
find out how to get the column attributes so I can figure out which
one(s) are auto increment (or rather, which ones are coming from a
sequence definition via "default nextval ('seqname')").

What I can't figure out is, given an oid, how can I figure out what
table it belongs to?

roland
--
Roland B. Roberts, PhD                  Custom Software Solutions
roberts@panix.com                           101 West 15th St #4NN
                                               New York, NY 10011

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Thomas G. Lockhart"
Дата:
Сообщение: Re: [HACKERS] OR clause status
Следующее
От: "Dr. Michael Meskes"
Дата:
Сообщение: Declare Cursor question again