Re: Using oids

Поиск
Список
Период
Сортировка
От Malcolm Warren
Тема Re: Using oids
Дата
Msg-id opruw7rgmsoa2ek7@10.0.0.1
обсуждение исходный текст
Ответ на Re: Using oids  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
Ответы Re: Using oids  (Alvaro Herrera Munoz <alvherre@dcc.uchile.cl>)
Список pgsql-general
On Wed, 03 Sep 2003 11:40:01 +0100, Oliver Elphick <olly@lfix.co.uk> wrote:

> On Wed, 2003-09-03 at 10:39, Malcolm Warren wrote:
>> The point about oids is that they are so useful that many people have
>> used them extensively, me included.
>> And I did so on the basis of a book written by Bruce Mowjian, one of
>> Postgresql's major contributors.
>>
>> If we are saying that there will always be backwards compatibility then
>> I can sleep at night.
>> If we are saying that at some point oids will exist no more then all of
>> a sudden I am going to have to re-write an awful lot of code.
>
> I wrote that passage for the Debian package on the basis of various
> emails I have read on the lists in the past.  Whether the oid feature
> will ever be completely removed, I cannot say.
>
> It is certainly the case that if oids wrap round, uniqueness is no
> longer guaranteed.  You may be certain that your oid counter won't wrap,
> but I cannot express such certainty for all possible users of the Debian
> package.
>
> It is my contention that it is wrong to build your database design on an
> internal feature of the database; it automatically makes it unportable
> to any other database.  To my mind, it also demonstrates that the
> database design is faulty.  If the tables in question have candidate
> keys, why not use them?  If they don't, how can it be meaningful to use
> the oid as a foreign key?
>

Thanks for your reply Oliver, it's great to hear direct from the source.

I agree with you about database design and in fact fortunately I don't use
oids as foreign keys, which I thought unwise.
However I have found oids very useful as temporary unique references to a
record in my programming.
If I had known when I started writing my code three years ago that there
was even the
slightest doubt about continuing with oids then I wouldn't have used them.

As it is, I've used them extensively, because like many people I am
fortunate enough to be only dealing in thousands, not even millions of
records. And also because I had read a lot of documentation and had seen
nothing
that even hinted at a problem using them, on the contrary, I found
references to their usefulness.

So, will there be backwards compatibility? Surely if they are going to be
got rid of (for the moment by default they are still used), there has to be
the possibility to switch them on again where necessary?

I think with this email I have had my final say. I see that there is still
debate going on about what to do with oids and I've been able to have put
my point. Thanks.

Malcolm Warren

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Oracle decode Function in Postgres
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: Querying $libdir