<[EMAIL PROTECTED]> writes:
> select bare_code::text from ean_article;
> ERROR: Cannot cast type 'ean13' to 'text'
> What can i do in my new type in order to use cast ???
You have to provide a conversion function, declared like
text(ean13) returns text
The cast syntax is just an alias for invoking this function.
regards, tom lane
- [HACKERS] CAST ON NEW TYPE pejac
- Re: [HACKERS] CAST ON NEW TYPE Tom Lane
- Re: [HACKERS] CAST ON NEW TYPE Thomas Lockhart
