macaddr Functions
trunc(macaddr)
Description: Sets last 3 bytes to zero.
Return type: macaddr. The trunc(macaddr) function returns a MAC address with the last 3 bytes set to zero.
Example:
1 2 3 4 5 |
gaussdb=# SELECT trunc(macaddr '12:34:56:78:90:ab') AS RESULT; result ------------------- 12:34:56:00:00:00 (1 row) |
The macaddr type also supports the standard relational operators (such as > and <=) for lexicographical ordering, and the bitwise arithmetic operators (~, & and |) for NOT, AND and OR.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.