Re: [PATCHES] resetStringInfo

2007-03-03 Thread Bruce Momjian
Are there any places in our code where we could use it? If so, please add that to the patch. --- Neil Conway wrote: Attached is a patch that makes a minor addition to the StringInfo API: resetStringInfo(), which clears

Re: [PATCHES] POSIX shared memory support

2007-03-03 Thread Joshua D. Drake
If you have the need to ship a product with Postgres embedded in it and are unable to change kernel settings (like myself), this might be of use to you. I have tested all of the failure situations I could think of by various combinations of deleting lockfiles while in use, changing the PID

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Neil Conway
On Sat, 2007-03-03 at 11:23 -0500, Bruce Momjian wrote: Are there any places in our code where we could use it? I manually grep'ed around and found a few places where resetStringInfo can be used, but I probably didn't find them all: it's quite hard to find all the places in which StringInfo-len

Re: [PATCHES] Allow \pset to parse on or off for boolean values

2007-03-03 Thread Bruce Momjian
I have applied a modified version of your patch, attached. You missed the cases where \x and \t also need to support boolean constants. The documentation lumped them all together, and they should be consistent with the \pset behavior. You will see my change in the modified do_pset() calls.

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Attached is a patch that makes a minor addition to the StringInfo API: resetStringInfo(), which clears the current content of the StringInfo but leaves it valid for future operations. I needed this for an external project, but ISTM this would be worth

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Alvaro Herrera
Neil Conway wrote: On Sat, 2007-03-03 at 11:23 -0500, Bruce Momjian wrote: Are there any places in our code where we could use it? I manually grep'ed around and found a few places where resetStringInfo can be used, but I probably didn't find them all: it's quite hard to find all the places

Re: [PATCHES] [HACKERS] Deadlock with pg_dump?

2007-03-03 Thread Bruce Momjian
I have applied a modified version of this patch, attached. I trimmed down the description of log_lock_waits to be more concise, and moved the idea of using this to tune deadlock_timeout to the deadlock_timeout section of the manual.

Re: [PATCHES] pg_standby Error cleanup

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Darcy Buskermolen wrote: Please find attached a patch which provides for logging in the event that -k is unable to clean up an old WAL file. Also make the failed to remove file error

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Joe Conway
Tom Lane wrote: Neil Conway [EMAIL PROTECTED] writes: Attached is a patch that makes a minor addition to the StringInfo API: resetStringInfo(), which clears the current content of the StringInfo but leaves it valid for future operations. I needed this for an external project, but ISTM this

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Neil Conway
On Sat, 2007-03-03 at 10:57 -0800, Joe Conway wrote: I have used pfree(var.data) combined with initStringInfo(var) in a few places (e.g. in tablefunc.c). Thanks, fixed. I also did a bit more searching and found some more places where resetStringInfo() could be used to replace the previous

Re: [PATCHES] xpath_array with namespaces support

2007-03-03 Thread Bruce Momjian
I tried this patch bug found this regression failure: -- Considering only built-in procs (prolang = 12), look for multiple uses -- of the same internal function (ie, matching prosrc fields). It's OK to -- have several entries with different pronames for the same internal function, --

Re: [PATCHES] resetStringInfo

2007-03-03 Thread Neil Conway
On Sat, 2007-03-03 at 15:04 -0300, Alvaro Herrera wrote: I think this is the reason why struct members are prefixed with some short form of the struct name; for example struct timeval has tv_sec and tv_usec. This is used in a lot of places in our code. Maybe it would be a good idea to make

Re: [PATCHES] lo_truncate

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Kris Jurka wrote: On Wed, 28 Feb 2007, Bruce Momjian wrote: Your patch has been added to the PostgreSQL unapplied patches list at:

Re: [PATCHES] Fast COPY after TRUNCATE bug and fix

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Simon Riggs wrote: It's been pointed out to me that I introduced a bug as part of the recent optimisation of COPY-after-truncate. The attached patch fixes this for me on CVS HEAD. It does

Re: [PATCHES] Split _bt_insertonpg to two functions

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Heikki Linnakangas wrote: Here's a patch that: Moves the logic to find a page with enough room from _bt_insertonpg to a new function, _bt_findinsertloc. It makes the code more readable,

Re: [PATCHES] cosmetic patch to large object regression test

2007-03-03 Thread Bruce Momjian
Patch applied. Thanks. --- Jeremy Drake wrote: Since I have now learned that it is possible to input values in hex in postgres, I submit this patch to clean up the ugly workaround I did in the largeobject regression

Re: [PATCHES] cosmetic patch to large object regression test

2007-03-03 Thread Jeremy Drake
On Sat, 3 Mar 2007, Bruce Momjian wrote: Patch applied. Thanks. Another usage of the old workaround for the flags was added with the application of the lo_truncate patch. This patch changes that one to be consistent with the others.

Re: [PATCHES] cosmetic patch to large object regression test

2007-03-03 Thread Neil Conway
On Sat, 2007-03-03 at 14:48 -0800, Jeremy Drake wrote: Another usage of the old workaround for the flags was added with the application of the lo_truncate patch. This patch changes that one to be consistent with the others. Applied, thanks. -Neil ---(end of

Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch

2007-03-03 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. ---