[PATCHES] Typo in README

2008-04-11 Thread Brendan Jurd
Hi there, Noticed a typo in the root README file. Patch below. Regards, BJ --- a/README +++ b/README @@ -20,7 +20,7 @@ PHP - http://www.php.net Python - http://www.initd.org/ Ruby - http://ruby.scripting.ca/postgres/ -Other language binding are available from a variety of contributing

Re: [PATCHES] Typo in README

2008-04-11 Thread Bruce Momjian
Brendan Jurd wrote: Hi there, Noticed a typo in the root README file. Patch below. Regards, BJ --- a/README +++ b/README @@ -20,7 +20,7 @@ PHP - http://www.php.net Python - http://www.initd.org/ Ruby - http://ruby.scripting.ca/postgres/ -Other language binding are available

[PATCHES] libpq patch for pqtypes hook api and PGresult creation

2008-04-11 Thread Andrew Chernow
Here are the changes to libpq. It adds the ability to register an Object Hook and create a home-grown result. Patch adds 4 functions. We changed the name of PQresultSetFieldValue to PQsetvalue, which better compliments PQgetvalue. If this patch is acceptable, we will move on to making the

Re: [PATCHES] libpq patch for pqtypes hook api and PGresult creation

2008-04-11 Thread Merlin Moncure
On Fri, Apr 11, 2008 at 1:47 PM, Andrew Chernow [EMAIL PROTECTED] wrote: Here are the changes to libpq. It adds the ability to register an Object Hook and create a home-grown result. Patch adds 4 functions. We changed the name of PQresultSetFieldValue to PQsetvalue, which better

[PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
I noticed several months ago, and came across it again today, that libpq's pthread-win32.c implementation is using CreateMutex rather than CRITICAL_SECTION. CreateMutex is like a semaphore in that it is designed to be accessible via name system-wide. Even when you don't give it a name, thus

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Magnus Hagander
Andrew Chernow wrote: I noticed several months ago, and came across it again today, that libpq's pthread-win32.c implementation is using CreateMutex rather than CRITICAL_SECTION. CreateMutex is like a semaphore in that it is designed to be accessible via name system-wide. Even when you

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
Magnus Hagander wrote: It changes the behavior when the pointer passed in is invalid from crash to silent working, right? Correct, it a Habit. I sub-consciously write code that checks pointers. We can remove the pointer checks and let the thing dump core if people prefer. Which brings up

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Merlin Moncure
On Fri, Apr 11, 2008 at 2:49 PM, Magnus Hagander [EMAIL PROTECTED] wrote: Andrew Chernow wrote: I noticed several months ago, and came across it again today, that libpq's pthread-win32.c implementation is using CreateMutex rather than CRITICAL_SECTION. CreateMutex is like a semaphore in

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Tom Lane
Andrew Chernow [EMAIL PROTECTED] writes: The attached patch replaces the win32 mutex calls with critical section calls. The change will not affect the behavior of the windows pthread_xxx functions. Why have you defined the lock/unlock functions as willing to fall through silently if handed

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
Tom Lane wrote: Andrew Chernow [EMAIL PROTECTED] writes: The attached patch replaces the win32 mutex calls with critical section calls. The change will not affect the behavior of the windows pthread_xxx functions. Why have you defined the lock/unlock functions as willing to fall through

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
Tom Lane wrote: Silently not locking is surely not very safe. Here is the dump code version of the patch. If anyone wants the return value idea, let me know. -- Andrew Chernow eSilo, LLC every bit counts http://www.esilo.com/ Index: src/port/pthread-win32.h

Re: [PATCHES] Maintaining cluster order on insert

2008-04-11 Thread Bruce Momjian
This idea has been rejected to do poor performance results reported later in the thread. --- Heikki Linnakangas wrote: While thinking about index-organized-tables and similar ideas, it occurred to me that there's some

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
Andrew Chernow wrote: Tom Lane wrote: Silently not locking is surely not very safe. Here is the dump code version of the patch. If anyone wants the return value idea, let me know. A more graceful solution would

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Tom Lane
Andrew Chernow [EMAIL PROTECTED] writes: A more graceful solution would be to print something to stderr and then exit. stderr doesn't exist, or point to a useful place, in many environments. And a forced exit() is no better than a crash for most purposes. I don't think libpq should core dump

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread daveg
On Fri, Apr 11, 2008 at 06:25:53PM -0400, Tom Lane wrote: Andrew Chernow [EMAIL PROTECTED] writes: A more graceful solution would be to print something to stderr and then exit. stderr doesn't exist, or point to a useful place, in many environments. And a forced exit() is no better than a

Re: [PATCHES] libpq Win32 Mutex performance patch

2008-04-11 Thread Andrew Chernow
daveg wrote: On Fri, Apr 11, 2008 at 06:25:53PM -0400, Tom Lane wrote: Andrew Chernow [EMAIL PROTECTED] writes: A more graceful solution would be to print something to stderr and then exit. stderr doesn't exist, or point to a useful place, in many environments. And a forced exit() is no