Re: [PATCHES] pstrndup()

2004-03-21 Thread Karel Zak
On Sun, Mar 21, 2004 at 11:45:18PM -0500, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Karel, do you plan to use pstrndup for some purpose? I assume so. I thinkPostgreSQL should supports basicoperation with allocation/strings if it's open for users' C func

Re: [PATCHES] [HACKERS] libpq thread safety

2004-03-21 Thread Manfred Spraul
Bruce Momjian wrote: I could not get this patch to compile. I am getting a failure because BSD/OS doesn't have pthread_rwlock_wrlock(). I am concerned other platforms might not have it either. I feared that. I'll switch to pthread_mutex_lock()+_unlock(). pthread_rwlock_wrlock()+_unlock was fa

Re: [PATCHES] [HACKERS] UnixWare/CVS Tip/initdb.c needs to use threads

2004-03-21 Thread Bruce Momjian
Larry Rosenman wrote: -- Start of PGP signed section. > [moved to -patches because of the patch] > > > --On Friday, March 19, 2004 08:01:53 -0500 Bruce Momjian > <[EMAIL PROTECTED]> wrote: > > > Larry Rosenman wrote: > >> > I thought that once you include libpthread in libpq, that you don't > >

Re: [PATCHES] pstrndup()

2004-03-21 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Karel, do you plan to use pstrndup for some purpose? I assume so. I am not familiar with strndup. If the spec is like strncpy, I would vote against including it ... strncpy is so broken that we had to invent our own variant ...

Re: [PATCHES] pstrndup()

2004-03-21 Thread Bruce Momjian
Karel, do you plan to use pstrndup for some purpose? I assume so. --- Karel Zak wrote: > > Hi guys, > > we have pstrdup(char *string) and this tiny patch adds > pstrndup(char *sting, Size len). > > By the way, I a

Re: [PATCHES] [pgsql-hackers-win32] xlog.c timezone name size

2004-03-21 Thread Bruce Momjian
I have increased the str_time() static variable length to 128. Thanks. --- Korea PostgreSQL Users' Group wrote: > On multibyte language locale environment of win32, size of %Z of localtime() > function is bigger more then

Re: [PATCHES] Another pg_autovacuum patch

2004-03-21 Thread Bruce Momjian
Patch applied to HEAD and 7.4.X. Thanks. --- Matthew T. O'Connor wrote: > In working through a pg_autovacuum problem with Joe Conway (which turned > out to be the same problem reported by Cott Lang which the previous > pa

Re: [PATCHES] [HACKERS] libpq thread safety

2004-03-21 Thread Bruce Momjian
I could not get this patch to compile. I am getting a failure because BSD/OS doesn't have pthread_rwlock_wrlock(). I am concerned other platforms might not have it either. The compile failure is: gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -O1 -Wall -Wmissin

Re: [PATCHES] change output of \dp

2004-03-21 Thread Bruce Momjian
This is the one applied. --- Euler Taveira de Oliveira wrote: > Hi Bruce, > > > > > Sounds good. Do you want your original patch applied? > > > Sorry for the delay, i just redo the patch and change some documentation. Pl

Re: [PATCHES] change output of \dp

2004-03-21 Thread Bruce Momjian
Newest version of patch applied. Thanks. Handles views and sequences. --- Euler Taveira de Oliveira wrote: > Hi, > > I just noticed that \dp outputs "Table" to indicate relations (tables, sequences and > views) instead

Re: [PATCHES] [HACKERS] 7.4.2 Build broken on (Sparc) Solaris 7 and 8

2004-03-21 Thread Bruce Momjian
Jim Seymour wrote: > Bruce Momjian <[EMAIL PROTECTED]> wrote: > > > [snip] > > > > OK, patch attached and applied. It adds configure tests for the 5-arg > > version of getpwuid_r() and properly falls back to the Posix draft > > version you have on Solaris. Seems Solaris 9 also still has the dra

Re: [PATCHES] listening addresses

2004-03-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: > + * check if ListenAddresses is empty or all spaces >> >> Why do you need this test (or the NetServer bool) at all? Just scan >> the string and bind to whatever it mentions. > It is used in the existing code to test if we can do

Re: [PATCHES] [HACKERS] listening addresses

2004-03-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Also, what of EINTR from select()? > It will fail. Not sure what else it should do - I'm open to suggestions. > Retry? Yes. AFAIR, all our other select calls will just loop indefinitely on EINTR. regards, t

Re: [PATCHES] [HACKERS] listening addresses

2004-03-21 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: This patch attempts to implement the idea, with safety in case the packet is not immediately available. Seems like you ought to be testing for failure returns from send() and recv(). Good point. will do. Also, what of EINTR

Re: [PATCHES] listening addresses

2004-03-21 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Submitted for review. Okay, some random comments: ! char *ListenAddresses = "localhost"; I think you made this mistake in the log_line_prefix patch too. The contents of a GUC string var should always be either NULL o

Re: [PATCHES] [HACKERS] listening addresses

2004-03-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > This patch attempts to implement the idea, with safety in case the > packet is not immediately available. Seems like you ought to be testing for failure returns from send() and recv(). Also, what of EINTR from select()? regard

Re: [PATCHES] listening addresses

2004-03-21 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Submitted for review. Okay, some random comments: > ! char *ListenAddresses = "localhost"; I think you made this mistake in the log_line_prefix patch too. The contents of a GUC string var should always be either NULL or a pointer to a mallo

Re: [PATCHES] [HACKERS] listening addresses

2004-03-21 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: A small problem with it was reported to me a couple of days ago - user had firewalled off all IP6 traffic. The stats collector happily bound and connected to the socket, but all the packets fell in the bit bucket. They found it qui

[PATCHES] win32 build patch

2004-03-21 Thread Claudio Natoli
For application to HEAD. Adds DLLIMPORT modifier to check_function_bodies --- Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em ailpolicy.html