I have the following issue.

Given the following tables:

CREATE TABLE test ( details varchar[]);
CREATE TABLE test2 ( textvalue1 varchar, textvalue2 varchar);
INSERT INTO test2 VALUES ('Hello1', 'World1');
INSERT INTO test2 VALUES ('hello2', 'World2');

I would like to insert a row in test for each row of the test2 table i.e.
INSERT INTO test (details) SELECT test2.textvalue1, test2.textvalue2 FROM test2

and I am expecting the following rows in test
{'Hello1', 'World1'}
{'Hello2', 'World2'}

The above syntax is giving an error.  How can this be done in postgres ?

Postgres version I am using is 7.3.4

Regards
Robert

Reply via email to