Re: OID's

Поиск
Список
Период
Сортировка
От Matt
Тема Re: OID's
Дата
Msg-id 1100645669.4227.82.camel@matt.kynx.org
обсуждение исходный текст
Ответ на Re: OID's  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
> How do you make use of this? It seems like you would need your code to know
> which foreign_oid referred to which table to actually perform the join.

Sorry, wasn't very clear about what it does:

select * from mytable t left join joinme j on t.id = j.foreign_id and
t.tableoid = j.foreign_oid;

I use it for 'PostIt note' type data that I want to be able to stick to
any other row in the DB. Keeping the referential integrity is a bit of
extra work, but I'm working on it :)

If you're going the other way, yes, you'll need to find out what tables
are joined to your postit first. But that's easy with:

select foreign_oid::regclass from joinme where...

But back to my original question: are those tableoid's going to suddenly
wrap around?

M


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

Предыдущее
От: "Sim Zacks"
Дата:
Сообщение: Re: Data from Internet direct into PostgeSQL Database??
Следующее
От: matthias@cmklein.de
Дата:
Сообщение: Problems importing Unicode