Skip site navigation (1) Skip section navigation (2)

Re: Will PQregisterThreadLock() be documented?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>,pgsql-docs(at)postgresql(dot)org
Subject: Re: Will PQregisterThreadLock() be documented?
Date: 2005-10-16 17:15:45
Message-ID: 200510161715.j9GHFjq22193@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-docspgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Volkan YAZICI wrote:
> >> Will PQregisterThreadLock() - which is defined globally in
> >> src/interfaces/libpq/fe-connect.c - be documented?
> 
> > Yes, it should be documented.
> 
> Really?  Do we intend applications to call it?

Uh, well, we never call it ourselves, so if we don't expect other
applications to call it, why is it there?

Our code has:
	
	/*
	 *     Used to set callback that prevents concurrent access to
	 *     non-thread safe functions that libpq needs.
	 *     The default implementation uses a libpq internal mutex.
	 *     Only required for multithreaded apps that use kerberos
	 *     both within their app and for postgresql connections.
	 */
	typedef void (*pgthreadlock_t) (int acquire);
	
	extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);

We need to research why it was added.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-docs by date

Next:From: Tom LaneDate: 2005-10-16 17:52:29
Subject: Re: Will PQregisterThreadLock() be documented?
Previous:From: Tom LaneDate: 2005-10-16 16:47:44
Subject: Re: Will PQregisterThreadLock() be documented?

pgsql-patches by date

Next:From: Tom LaneDate: 2005-10-16 17:38:53
Subject: Re: [HACKERS] Patching dblink.c to avoid warning about open transaction
Previous:From: Tom LaneDate: 2005-10-16 16:47:44
Subject: Re: Will PQregisterThreadLock() be documented?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group