-- -- Test COPY table TO --
copy test1 to stdout; -- -- This should fail --
copy v_test1 to stdout; -- -- Test COPY (select) TO --
copy (select t from test1 where id=1) to stdout; -- -- Test COPY (select for update) TO --
copy (select t from test1 where id=3forupdate) to stdout; -- -- This should fail --
copy (select t into temp test3 from test1 where id=3) to stdout; -- -- This should fail --
copy (select * from test1) from stdin; -- -- This should fail --
copy (select * from test1) (t,id) to stdout; -- -- Test JOIN --
copy (select * from test1 join test2 using (id)) to stdout; -- -- Test UNION SELECT --
copy (select t from test1 where id = 1UNIONselect * from v_test1 ORDERBY1) to stdout; -- -- Test subselect --
copy (select * from (select t from test1 where id = 1UNIONselect * from v_test1 ORDERBY1) t1) to stdout; -- -- Test headers, CSV and quotes --
copy (select t from test1 where id = 1) to stdout csv header force quote t; -- -- Test psql builtins, plain table --
\copy test1 to stdout -- -- This should fail --
\copy v_test1 to stdout -- -- Test \copy (select ...) --
\copy (select"id",'id','id""'||t,(id + 1)*id,t,"test1"."t"from test1 where id=3) to stdout -- -- Drop everything -- droptable test2; drop view v_test1; droptable test1;
-- psql handling of COPY in multi-command strings
copy (select1) to stdout\; select1/0; -- row, then error select1/0\; copy (select1) to stdout; -- error only
copy (select1) to stdout\; copy (select2) to stdout\; select3\; select4; -- 1 2 3 4
createtable test3 (c int); select0\; copy test3 from stdin\; copy test3 from stdin\; select1; -- 0 1 1
\. 2
\. select * from test3; droptable test3;
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet am 2026-08-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.