Re: Executing prepared statements in the multithreaded envs

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "Ruslan R(dot) Laishev" <zator(at)yandex(dot)ru>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Executing prepared statements in the multithreaded envs
Date: 2017-10-17 14:09:13
Message-ID: CAKFQuwaxNLYndO6Wcppj-3pNuHSeCuJf8WjRMLWNqruq52DqPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, Oct 17, 2017 at 7:00 AM, Ruslan R. Laishev <zator(at)yandex(dot)ru> wrote:

> Hi All!
>
> I'd like to use a pool of connections in multi-threaded environment, so:
>
> 1. I created a pool of N-connection by calling PQconnectdb().
> 2. Do I'm need to calling PQprepare() for the every sql_query for the
> every connection from the pool ?
>
>

​Named prepared statements are session-local information. When you first
start a new session there are none. The ones you create remain until you
either disconnect the session or "RESET" the session.

David J.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ruslan R. Laishev 2017-10-17 15:02:48 Re: Executing prepared statements in the multithreaded envs
Previous Message Ruslan R. Laishev 2017-10-17 14:00:44 Executing prepared statements in the multithreaded envs