From: | "Mayers, Philip J" <p(dot)mayers(at)ic(dot)ac(dot)uk> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Casting macaddr types to text |
Date: | 2001-01-29 15:10:21 |
Message-ID: | A0F836836670D41183A800508BAF190B35E2E4@icex1.cc.ic.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm trying to do this:
hdb=> select * from interface where mac like '08:%';
ERROR: Unable to identify an operator '~~' for types 'macaddr' and
'unknown'
You will have to retype this query using an explicit cast
There's no like operator (~~) defined for mac. Ok, fine. *BUT*, nor is there
a cast to text either:
hdb=> select * from interface where mac::text like '08:%';
ERROR: Cannot cast type 'macaddr' to 'text'
Why? It seems clear to me that there is a well-defined cast to text type,
and in the absence of a like operator...
Advice?
Regards,
Phil
+----------------------------------+
| Phil Mayers, Network Support |
| Centre for Computing Services |
| Imperial College |
+----------------------------------+
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lémery | 2001-01-29 15:14:01 | Limited rights for a user |
Previous Message | Jan Wieck | 2001-01-29 14:58:17 | Re: : Execute a string of command in sql'script |