Re: A problem presentaion about ECPG, DECLARE STATEMENT - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: A problem presentaion about ECPG, DECLARE STATEMENT
Date
Msg-id 0eb53d98-d771-9cac-44ce-c1eb18ef0767@2ndquadrant.com
Whole thread Raw
In response to Re: A problem presentaion about ECPG, DECLARE STATEMENT  (Michael Meskes <meskes@postgresql.org>)
Responses RE: A problem presentaion about ECPG, DECLARE STATEMENT
RE: A problem presentaion about ECPG, DECLARE STATEMENT
Re: A problem presentaion about ECPG, DECLARE STATEMENT
List pgsql-hackers
On 2019-09-11 18:04, Michael Meskes wrote:
>>>> Is it acceptable for PG12?
>>> In general absolutely.
>>
>> It seems far too late to be considering any major rewrite for v12;
>> even assuming that there was consensus on the rewrite being an
>> improvement, which I bet there won't be.
> 
> Oops, I read 13. Yes, it's obviously way too late for 12. Sorry for the
> noise.
> 
> In this case I'd like to details about what is wrong with the
> implementation.

I tried finding some information about where the idea for this statement
came from but couldn't find any.  The documentation references Oracle
and DB2, and while they indeed do have this statement, it doesn't seem
to be used for the same purpose.  The only purpose in ECPG appears to be
to associate a statement with a connection, but for example the DB2
implementation doesn't even have the AT clause, so I don't see how that
could be the same.

Moreover, I've been wondering about the behavior detail given in the
table at
<https://www.postgresql.org/docs/devel/ecpg-sql-declare-statement.html>.
 In scenario 3, the declare statement says con1 but the subsequent
dynamic statement says con2, and as a result of that, con1 is used.
This is not intuitive, I'd say, but given that there is no indication of
where this statement came from or whose idea it follows, it's unclear
how to evaluate that.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: [PATCH] Improve performance of NOTIFY over many databases (v2)
Next
From: Peter Eisentraut
Date:
Subject: ecpglib major version changed