Re: heap_create with OID?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: heap_create with OID?
Дата
Msg-id 26430.962693856@sss.pgh.pa.us
обсуждение исходный текст
Ответ на heap_create with OID?  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: heap_create with OID?  (Philip Warner <pjw@rhyme.com.au>)
Re: heap_create with OID?  (JanWieck@t-online.de (Jan Wieck))
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> I am wondering if anyone can see an immediate problem in creating a function:
>     heap_create_oid
> which is just like heap_create, but takes an oid arg. This oid (assuming
> it's free) would be used to create the object.

How exactly do you propose to determine that the OID is free?
If the requested OID is greater than the current OID counter, how
will you prevent a future conflict?

There's no inherent problem in forcing a particular choice of OID;
initdb does it on every run.  The trick is to avoid a conflict of
OID assignments.

My own feeling is that the current LO setup is fundamentally flawed
by its reliance on specific OID values, and that the right answer is
to find a way to avoid that.  contrib/lo might provide some food for
thought here (although it's clearly not the whole answer either).
        regards, tom lane


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

Предыдущее
От: Chris Bitmead
Дата:
Сообщение: Re: heap_create with OID?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Re: proposed improvements to PostgreSQL license