Question about casts - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Question about casts
Date
Msg-id 446C959A.10208@tada.se
Whole thread Raw
Responses Re: Question about casts
List pgsql-hackers
Just out of curiosity (and most likely, ignorance). Why can't I cast an 
array of strings into a string? I.e.
 thhal=# select ('{"a","b"}'::varchar[])::varchar; ERROR:  cannot cast type character varying[] to character varying

or a cstring into a varchar, i.e.
 thhal=# select array_out('{"a","b"}'::varchar[])::varchar; ERROR:  cannot cast type cstring to character varying

ISTM, the implementation of such casts should be fairly simple and 
straight forward and sometimes even useful. Every data type comes with 
string coercion routines anyway right?

Regards,
Thomas Hallgren



pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: Google and the Beta Freeze
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Question about casts