Re: macaddr 64 bit (EUI-64) datatype support - Mailing list pgsql-hackers

From Tom Lane
Subject Re: macaddr 64 bit (EUI-64) datatype support
Date
Msg-id 17621.1480139317@sss.pgh.pa.us
Whole thread Raw
In response to Re: macaddr 64 bit (EUI-64) datatype support  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: macaddr 64 bit (EUI-64) datatype support
List pgsql-hackers
Haribabu Kommi <kommi.haribabu@gmail.com> writes:
> Currently the casting is supported from macaddr to macaddr8, but not the
> other way. This is because, not all 8 byte MAC addresses can be converted
> into 6 byte addresses.

Well, yeah, so you'd throw an error if it can't be converted.  This is
no different from casting int8 to int4, for example.  We don't refuse
to provide that cast just because it will fail for some values.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Skipping PgStat_FunctionCallUsage for many expressions
Next
From: Jim Nasby
Date:
Subject: Re: References to arbitrary database objects that are suitable for pg_dump