[BUGS] plpgsql - wrong using of PERFORM statement doesn't raise a error - Mailing list pgsql-bugs

From Pavel Stehule
Subject [BUGS] plpgsql - wrong using of PERFORM statement doesn't raise a error
Date
Msg-id CAFj8pRDtmPEekCWNpKQjcJ5=o5YPBR6SrNTZWGS+j-mx3c9UhQ@mail.gmail.com
Whole thread Raw
Responses Re: [BUGS] plpgsql - wrong using of PERFORM statement doesn't raise a error
List pgsql-bugs
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


Regards

Pavel Stehule

pgsql-bugs by date:

Previous
From: Josef Machytka
Date:
Subject: Re: [BUGS] BUG #14471: PostgreSQL 9.6 "NOT IN" in select causes crashwith "ERROR: unknown error"
Next
From: Pavel Stehule
Date:
Subject: Re: [BUGS] plpgsql - wrong using of PERFORM statement doesn't raise a error