Heikki Linnakangas writes:
>SELECT '("(1)")'::btype INTO bvar; -- Should work, but errors
No, because it's expecting the SELECT to yield a separate column for
each column of the composite variable bvar. Something like
SELECT ('("(1)")'::btype).* INTO bvar;
would be correct. To make it wo
Tested on 8.2, 8.3 and CVS HEAD:
CREATE TYPE atype AS (a int);
CREATE TYPE btype AS (compcol atype);
CREATE FUNCTION foofunc() RETURNS void AS $$
declare
avar atype;
bvar btype;
begin
SELECT '("(1)")'::btype INTO bvar; -- Should work, but errors
end;
$$ LANGUAGE plpgsql;
SELECT foofunc(