Meskes-san
I'm sorry for my slow reply.
> I agree that we have to accept a quoted statement name and your
> observations are correct of course, I am merely wondering if we need
> the escaped quotes in the call to the ecpg functions or the libpq
> functions.
The following allows to use statement name including white space not double-quoted statement name.
exec sql prepare "st1 x" from "select 1";
# I don't know whether the existing ECPG allows it intentionally or not.
# In honestly, I think that it's not necessary to allow it.
If we also allow the statement name including white space in PREPRARE AS,
we have to make backend parser to scan it as IDENT.
Double-quoting is one way. There may be another way.
If we want to pass double-quoted statement name to backend through libpq,
preprocessor have to escape it.
> > 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.
I cannot think of anything.
I may notice if I try to merge.
Regards
Ryo Matsumura