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

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: "wjzeng" <zwjing_hot(at)hotmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: how to insure libpq(dll/so) for thread-safety?
Date: 2009-05-14 06:46:04
Message-ID: 20090514154406.873E.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"wjzeng" <zwjing_hot(at)hotmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-05-14 08:15:27 [PATCH] SE-PostgreSQL for v8.5 development (r1891)
Previous Message Heikki Linnakangas 2009-05-14 06:35:51 Re: PATCH to fix two little typo in charset.sgml