RE: SQL statement PREPARE does not work in ECPG

Поиск
Список
Период
Сортировка
От Matsumura, Ryo
Тема RE: SQL statement PREPARE does not work in ECPG
Дата
Msg-id 03040DFF97E6E54E88D3BFEE5F5480F737AE118D@G01JPEXMBYT04
обсуждение исходный текст
Ответ на Re: SQL statement PREPARE does not work in ECPG  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: SQL statement PREPARE does not work in ECPG  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-hackers
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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: C_C_A animal on HEAD gets stuck in initdb
Следующее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: [HACKERS][Proposal] LZ4 Compressed Storage Manager