From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Brendan Jurd <direvus(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Arithmetic operators for macaddr type |
Date: | 2011-12-12 04:59:40 |
Message-ID: | CAFj8pRBCghxmvDkJHZN-=h5i5dAXRWQyrkr4-ag=6DisvoDHiw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/12/12 Brendan Jurd <direvus(at)gmail(dot)com>:
> 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?
+1
Pavel
>
> Cheers,
> BJ
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
From | Date | Subject | |
---|---|---|---|
Next Message | Shigeru Hanada | 2011-12-12 10:33:06 | Re: WIP: Collecting statistics on CSV file data |
Previous Message | Brendan Jurd | 2011-12-12 04:57:48 | Arithmetic operators for macaddr type |