Arithmetic operators for macaddr type

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Arithmetic operators for macaddr type
Дата
Msg-id CADxJZo22bcxcqUEF__TANNtCjrzke2r9eHtJAf6QCHhbeU=FFQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Arithmetic operators for macaddr type  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hello folks,

I just bumped into a situation where I wanted to do a little macaddr
arithmetic in postgres.  I note that the inet type has support for
bitwise AND, OR and NOT, as well as subtraction, but macaddr has none
of the above.

These operations are easy to perform in C, but relatively a pain to do
in SQL, especially as there doesn't seem to be a direct way to get a
macaddr into a plain numeric form.

I can't see any reason why postgres shouldn't support these operations
on macaddr.  I'd like to add them as fully realised operators in core.Would that be acceptable?

Cheers,
BJ


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Why do regression tests now leave "regress_test_role_super" around?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Arithmetic operators for macaddr type