Wojciech Skaba writes:
> UPDATE directory SET faxes = ARRAY[ROW('11', '222', '333'), ROW('44',
> '555', '666')] WHERE id = 1;
> has failed: (You will need to rewrite or cast the expression) with arrow
> pointing to ARRAY.
> Does anybody know how to overcome it?
Just like it says, cast the
I did:
CREATE TYPE telephone AS (
area text,
number text,
ext text
);
Then:
CREATE TABLE directory (
id integer,
tel telephone,
faxes telephone[]
);
After some data has been entered, I tried:
UPDATE directory SET tel = ROW('11', '222', '333') WHERE id = 1;
UPDATE directory SET faxes[1] =