Re: Is PREPARE of ecpglib thread safe?

Поиск
Список
Период
Сортировка
От Kyotaro HORIGUCHI
Тема Re: Is PREPARE of ecpglib thread safe?
Дата
Msg-id 20190315.153730.145802138.horiguchi.kyotaro@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Is PREPARE of ecpglib thread safe?  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
Oops.

At Fri, 15 Mar 2019 15:33:50 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote in
<20190315.153350.226491548.horiguchi.kyotaro@lab.ntt.co.jp>
> >   // If ecpglib didn't reject the above, ecpglib cannot judge
> >   // which connection the followings should be executed on.
> >   exec sql prepare st1 from "select 1";
> >   exec sql execute st1;
> 
> I'm not sure about ECPG, but according to the documentation, the
> following statements should work correctly.
> 
>    SQL SET CONNECTION con1;

Of course this is missing prefixing "EXEC".

>    EXEC SQL PREPARE st1 FROM "select 1";
>    EXEC SQL EXECUTE st1;
> 
> should succeed and executed on con1.
> 
> > Kuroda-san, is it right?
> > If it's right, I will fix it with using pthread_lock.
> 
> Mmm. Are you saying that prepared statements on ECPG should have
> names in global namespace and EXECUTE should implicitly choose
> the underlying connection automatically from the name of a
> prepared statement? I don't think it is the right direction.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Is PREPARE of ecpglib thread safe?
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: pg_basebackup ignores the existing data directory permissions