Meskes-san
Thank you for your comment.
> One question though, why is the statement name always quoted? Do we
> really need that? Seems to be more of a hassle than and advantage.
The following can be accepted by preproc, ecpglib, libpq, and backend in previous versions.
exec sql prepare "st x" from "select 1";
exec sql execute "st x";
The above was preprocessed to the following.
PQprepare(conn, "\"st x\"", "select 1");
PQexec(conn, "\"st x\"");
By the way, the following also can be accepted.
PQexecParams(conn, "prepare \"st x\" ( int ) as select $1", 0, NULL, NULL, NULL, NULL, 0);
PQexecParams(conn, "execute \"st x\"( 1 )", 0, NULL, NULL, NULL, NULL, 0);
Therefore, I think that the quoting statement name is needed in PREPARE/EXECUTE case, too.
> I would prefer to merge as much as possible, as I am afraid that if we
> do not merge the approaches, we will run into issues later. There was a
> reason why we added PQprepare, but I do not remember it from the top of
> my head. Need to check when I'm online again.
I will also consider it.
Regards
Ryo Matsumura