Re: OID Usage

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: OID Usage
Дата
Msg-id 20050114231726.GG1724@svana.org
обсуждение исходный текст
Ответ на Re: OID Usage  (Bo Lorentsen <bl@netgroup.dk>)
Список pgsql-general
On Sat, Jan 15, 2005 at 12:06:41AM +0100, Bo Lorentsen wrote:
> Martijn van Oosterhout wrote:
> >It means using OIDs as you described has very well known problems and
> >they will break on you eventually. You can mitigate the damage by
> >creating a UNIQUE index on the oid column but you'd better be sure your
> >application can handle the side-effects.
> >
> Ok, Tom told me about the same :-(  But why are oid's still in PG, that
> are they good for ? Will there be a real unique row id, like there is in
> Oracle, or will this be keept as an internal value only ?

They're still there because the system tables use them. But for user
tables you use sequences which go up to 64 bit and have protection
against wraparound.

> Is this because some old application's using oid's in somewhat small
> dataset ?

Basically, OIDs are not useful in user tables, they're not unique, have
no special priveledges w.r.t. other columns. All they do is take up
extra storage space. Basically, the use of OIDs has been discouraged
for a long time now and it's finally getting to the stage where they'll
be disabled on user tables by default.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Aly Dharshi
Дата:
Сообщение: Re: ntfs for windows port rc5-2
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: OID Usage