Re: how to insure libpq(dll/so) for thread-safety? - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: how to insure libpq(dll/so) for thread-safety?
Date
Msg-id 20090514154406.873E.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to how to insure libpq(dll/so) for thread-safety?  ("wjzeng" <zwjing_hot@hotmail.com>)
List pgsql-hackers
"wjzeng" <zwjing_hot@hotmail.com> wrote:

> In pgsql/src/interfaces/libpq/fe-exec.c,  there are two variables:
> ---------
> static int static_client_encoding = PG_SQL_ASCII;
> static bool static_std_strings = false;
> 
> If enable_thread_safety is "no", how to insure libpq(dll/so) for 
> thread-safety?

Use PQescape[String|Bytea]Conn() instead of PQescape[String|Bytea]().
The static variables are used only in those deprecated functions.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: PATCH to fix two little typo in charset.sgml
Next
From: KaiGai Kohei
Date:
Subject: [PATCH] SE-PostgreSQL for v8.5 development (r1891)