Re: Executing prepared statements in the multithreaded envs

From: Ruslan R(dot) Laishev <zator(at)yandex(dot)ru>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Executing prepared statements in the multithreaded envs
Date: 2017-10-17 15:02:48
Message-ID: 980091508252568@web37g.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<div>Ho to check the PQprepare result ?</div><div>NULL or noNULL ?</div><div> </div><div> </div><div> </div><div>17.10.2017, 17:09, "David G. Johnston" &lt;david(dot)g(dot)johnston(at)gmail(dot)com&gt;:</div><blockquote type="cite"><div><div style="font-family:arial,helvetica,sans-serif;"><span style="font-family:arial,sans-serif;">On Tue, Oct 17, 2017 at 7:00 AM, Ruslan R. Laishev </span><span style="font-family:arial,sans-serif;">&lt;<a target="_blank" href="mailto:zator(at)yandex(dot)ru">zator(at)yandex(dot)ru</a>&gt;</span><span style="font-family:arial,sans-serif;"> wrote:</span></div><div><div><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><span style="font-family:courier new,monospace;">Hi All!</span></div><div> </div><div><span style="font-family:courier new,monospace;">I'd like to use a pool of connections in multi-threaded environment, so:</span></div><div> </div><div><span style="font-family:courier new,monospace;">1. I created a pool of N-connection by calling PQconnectdb().</span></div><div><span style="font-family:courier new,monospace;">2. Do I'm need to calling PQprepare() for the every sql_query for the every connection from the pool ?</span></div><div> </div></blockquote><div> </div><div style="font-family:arial,helvetica,sans-serif;">​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.</div><div style="font-family:arial,helvetica,sans-serif;"> </div><div style="font-family:arial,helvetica,sans-serif;">David J.</div></div></div></div></blockquote><div> </div><div> </div><div>-- </div><div>С уважением,<br />Ruslan R. Laishev</div><div>OpenVMS bigot, natural born system/network progger, C contractor.</div><div>+79013163222</div><div>+79910009922</div><div> </div>

Attachment Content-Type Size
unknown_filename text/html 1.9 KB

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2017-10-17 15:08:26 Re: Executing prepared statements in the multithreaded envs
Previous Message David G. Johnston 2017-10-17 14:09:13 Re: Executing prepared statements in the multithreaded envs