Hi
Following command finishing without any error, but (as expected) do nothing
postgres=# create table foo(a int);
CREATE TABLE
Time: 51,363 ms
postgres=# DO $$
postgres$# DECLARE t text;
postgres$# BEGIN
postgres$# t := 'INSERT INTO foo VALUES(10)';
postgres$# PERFORM t;
postgres$# END;
postgres$# $$;
DO
Time: 4,375 ms
postgres=# select * from foo;
┌───┐
│ a │
╞═══╡
└───┘
(0 rows)
Time: 1,367 ms
Related to
http://stackoverflow.com/questions/41294888/plpgsql-error-query-has-no-destination-for-result-data-on-a-parameter-declarati
Regards
Pavel Stehule