1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Behavior in Threaded Programs</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
15 TITLE="libpq - C Library"
16 HREF="libpq.html"><LINK
18 TITLE="The Password File"
19 HREF="libpq-pgpass.html"><LINK
21 TITLE="Building libpq Programs"
22 HREF="libpq-build.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="libpq-pgpass.html"
84 HREF="libpq-build.html"
98 NAME="LIBPQ-THREADING"
99 >27.12. Behavior in Threaded Programs</A
108 > is reentrant and thread-safe if the
112 > command-line option
115 >--enable-thread-safety</TT
116 > has been used when the PostgreSQL
117 distribution was built.
118 In addition, you might need to use additional compiler command-line
119 options when you compile your application code. Refer to your system's
120 documentation for information about how to build thread-enabled
123 >One restriction is that no two threads attempt to manipulate the same
127 > object at the same time. In particular, you cannot
128 issue concurrent commands from different threads through the same
129 connection object. (If you need to run concurrent commands, start up
130 multiple connections.)</P
135 > objects are read-only after creation, and so can be
136 passed around freely between threads.</P
138 >The deprecated functions <CODE
145 > are not thread-safe and should not be
146 used in multithread programs. <CODE
153 >. There is no good reason to
162 > applications that use the
166 > authentication method rely on the
170 > operating system function, which is often
174 > It is better to use the <TT
178 which is thread-safe on all platforms.</P
185 SUMMARY="Footer navigation table"
196 HREF="libpq-pgpass.html"
214 HREF="libpq-build.html"
224 >The Password File</TD