Re: operators +/- with oids

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: operators +/- with oids
Дата
Msg-id 29803.1073291461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на operators +/- with oids  (ivan <iv@psycho.pl>)
Список pgsql-hackers
ivan <iv@psycho.pl> writes:
> why there are no operators +-*/ to oid data type ?

Why should there be?  Addition on OIDs seems like a meaningless
operation, at least for the intended usage of OIDs (namely as
opaque identifiers).

Yes, I know we have < and >= and similar operators on OID, but those
are only there to support btree indexes on OIDs.  Equality is the only
user-meaningful operator in the lot, IMHO.

If you are desperate you can cast OID to int4 and then arithmetize it
all you want.
        regards, tom lane


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

Предыдущее
От: ivan
Дата:
Сообщение: operators +/- with oids
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Composite GiST indexes?