Re: query_id, pg_stat_activity, extended query protocol - Mailing list pgsql-hackers

From Imseih (AWS), Sami
Subject Re: query_id, pg_stat_activity, extended query protocol
Date
Msg-id 0FBCAA35-1200-41CA-8371-881141E1D7C6@amazon.com
Whole thread Raw
In response to Re: query_id, pg_stat_activity, extended query protocol  (Andrei Lepikhov <lepihov@gmail.com>)
Responses Re: query_id, pg_stat_activity, extended query protocol
Re: query_id, pg_stat_activity, extended query protocol
Re: query_id, pg_stat_activity, extended query protocol
List pgsql-hackers
> But simplistic case with a prepared statement shows how the value of
> queryId can be changed if you don't acquire all the objects needed for
> the execution:


> CREATE TABLE test();
> PREPARE name AS SELECT * FROM test;
> EXPLAIN (ANALYSE, VERBOSE, COSTS OFF) EXECUTE name;
> DROP TABLE test;
> CREATE TABLE test();
> EXPLAIN (ANALYSE, VERBOSE, COSTS OFF) EXECUTE name;

Hmm, you raise a good point. Isn't this a fundamental problem
with prepared statements? If there is DDL on the
relations of the prepared statement query, shouldn't the prepared
statement be considered invalid at that point and raise an error
to the user?

Regards,

Sami 


pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: New committers: Melanie Plageman, Richard Guo
Next
From: "David G. Johnston"
Date:
Subject: Re: query_id, pg_stat_activity, extended query protocol