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


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to