Thread: Casts to text/varchar

Casts to text/varchar

From
Greg Stark
Date:
ERROR:  Cannot cast type integer[] to character varying

I would think every datatype should have at least one cast, the cast to a text
or varchar. Otherwise how is an application to know how to print an arbitrary
unknown type for human consumption? Where do the existing "{...}"
representations get created and how does one invoke that in a query?

--
greg

Re: Casts to text/varchar

From
Dennis Gearon
Date:
Don't know,
good point,
looking forward to the answer :0(

Greg Stark wrote:
> ERROR:  Cannot cast type integer[] to character varying
>
> I would think every datatype should have at least one cast, the cast to a text
> or varchar. Otherwise how is an application to know how to print an arbitrary
> unknown type for human consumption? Where do the existing "{...}"
> representations get created and how does one invoke that in a query?
>
> --
> greg
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>