Thread: converting mac-adress type to string

converting mac-adress type to string

From
Michael Cochez
Date:
Hello,
I want to create a view where the mac address of a table is seen as a string i was thinking about something like this :
SELECT some_function_to_convert(mac_address) FROM table;
is this possible, and what function do i need to use?
why is it so difficult to change a view, things like changing column names/quantity
 seem to be impossible??

Michael Cochez


Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.

Re: converting mac-adress type to string

From
"Rodrigo De León"
Date:
On 9/20/07, Michael Cochez <michaelcochez@yahoo.com> wrote:
> Hello,
> I want to create a view where the mac address of a table is seen as a string
> i was thinking about something like this :
> SELECT some_function_to_convert(mac_address) FROM table;
> is this possible, and what function do i need to use?

SELECT mac_address::text FROM table;