Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Neil Conway
On Wed, 2005-11-30 at 19:36 -0700, Michael Fuhr wrote: Check integer conversion for overflow in datetime functions. It seems a bit laborious to always manually set errno to zero before invoking strtol() (both in the places added by the patch, and all the places that already did that). While it's

Re: [PATCHES] aclchk.c refactor

2005-12-01 Thread Alvaro Herrera
Alvaro Herrera wrote: I intend to apply later today the attached patch in order to reduce some code duplication in aclchk.c and clean a bit the API I just introduced in the previous patch. This reduces aclchk.c from 2377 lines to 2206. I applied this patch yesterday, but I did not receive the

[PATCHES] Allow an alias for the target table in UPDATE/DELETE

2005-12-01 Thread Atsushi Ogawa
I made a patch to allow an alias for target table in UPDATE/DELETE This is a TODO item. o Allow an alias to be provided for the target table in UPDATE/DELETE This is not SQL-spec but many DBMSs allow it. Example: UPDATE accounts AS a SET a.abalance = a.abalance + 10 WHERE a.aid = 1; I think

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: It seems a bit laborious to always manually set errno to zero before invoking strtol() (both in the places added by the patch, and all the places that already did that). While it's only a minor notational improvement, I wonder if it would be worth adding a

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Alvaro Herrera
Tom Lane wrote: Don't worry about that, I'll take care of it. I prefer committing all the branches at once when doing a multi-branch fix (less clutter in the CVS logs). How do you do that? I have multiple checked-out trees, I assume you do the same and just handle the simultaneous-ness by

Re: [PATCHES] [HACKERS] Strange interval arithmetic

2005-12-01 Thread Bruce Momjian
I started working on this problem on Tuesday, but was in New York City yesterday so I was not able to comment on this patch before. I think the one applied is great. (I added C comments on the use of errno = 0. Here is the patch I was working on. It does us a separate libpq strtol() function,

Re: [PATCHES] Check for integer overflow in datetime functions

2005-12-01 Thread Magnus Hagander
BTW, has anyone checked Command Prompt's Subversion repository? It's a mirror of our anonymous CVS (AFAICT). I'm using it for reading diffs lately, and it's much nicer to look at the whole patch as a single diff rather than going a single file at a time.

Re: [PATCHES] [HACKERS] Strange interval arithmetic

2005-12-01 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: Here is the patch I was working on. It does us a separate libpq strtol() function, but I question whether it is worth it, or if it is meaningful when used by FRONTEND applications. Anyway, I am just throwing it out if it gives others ideas. I did

Re: [PATCHES] Case Conversion Fix for MB Chars

2005-12-01 Thread Bruce Momjian
Where are we on this patch? Is it to be applied? --- Volkan YAZICI wrote: On 11/27/05, Volkan YAZICI [EMAIL PROTECTED] wrote: Tests made on an i686 with a 2.6.12.5 kernel. Here's a short list of cases I tried with

Re: [PATCHES] Fork-based version of pgbench

2005-12-01 Thread Tom Lane
Argh, I'm an idiot ... a big part of the problem with the original fork-based pgbench is that I'd rearranged the startup code without noticing a data dependency. You can't initialize the default scripts until you've gotten the correct value of tps by inspecting the database. What was happening

[PATCHES] TODO-Item: include for guc

2005-12-01 Thread Joachim Wieland
Hi, the attached patch implements the TODO-item o %Add include file functionality in postgresql.conf However I was not able to test it on Windows :-( I talked to Peter Eisentraut about how to handle relative file names and his opinion was that a relative file name should be

Re: [PATCHES] Fork-based version of pgbench

2005-12-01 Thread Qingqing Zhou
On Thu, 1 Dec 2005, Tom Lane wrote: Argh, I'm an idiot ... a big part of the problem with the original fork-based pgbench is that I'd rearranged the startup code without noticing a data dependency. You can't initialize the default scripts until you've gotten the correct value of tps by

Re: [PATCHES] Fork-based version of pgbench

2005-12-01 Thread Qingqing Zhou
Qingqing Zhou [EMAIL PROTECTED] wrote I've threaded it in Win32 ... Another thing is that if unix does fork() and windows does _beginthread(), then there will be some potential problem. For example, you have to be careful to add global variables ... Regards, Qingqing

Re: [PATCHES] Fork-based version of pgbench

2005-12-01 Thread Tom Lane
Qingqing Zhou [EMAIL PROTECTED] writes: Qingqing Zhou [EMAIL PROTECTED] wrote I've threaded it in Win32 ... Another thing is that if unix does fork() and windows does _beginthread(), then there will be some potential problem. For example, you have to be careful to add global variables ...

Re: [PATCHES] [HACKERS] Should libedit be preferred to libreadline?

2005-12-01 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: --with-preference-bsd-libeditprefer libedit over readline Can't it just be --with-libedit? That seems awfully verbose, particularly seeing that configure doesn't handle switch abbreviation. The patch looks OK offhand, though I didn't try

Re: [PATCHES] [HACKERS] Should libedit be preferred to libreadline?

2005-12-01 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: --with-preference-bsd-libeditprefer libedit over readline Can't it just be --with-libedit? That seems awfully verbose, particularly seeing that configure doesn't handle switch abbreviation. The problem is that we need a

Re: [PATCHES] [HACKERS] Should libedit be preferred to libreadline?

2005-12-01 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: Can't it just be --with-libedit? That seems awfully verbose, particularly seeing that configure doesn't handle switch abbreviation. The problem is that we need a clear way to say we don't want any line editing. Right now we do it

Re: [PATCHES] [HACKERS] Should libedit be preferred to libreadline?

2005-12-01 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian pgman@candle.pha.pa.us writes: Tom Lane wrote: Can't it just be --with-libedit? That seems awfully verbose, particularly seeing that configure doesn't handle switch abbreviation. The problem is that we need a clear way to say we don't want any line

Re: [PATCHES] [BUGS] BUG #2056: to_char no long takes time as input?

2005-12-01 Thread Bruce Momjian
Here is a patch that allows HH and HH12 to be used with interval, and hence time. I added documentation to warn users that using those with intervals are mapped to single-day values. I will soon apply this to HEAD and 8.1.X.

Re: [PATCHES] [HACKERS] Should libedit be preferred to libreadline?

2005-12-01 Thread Tom Lane
Bruce Momjian pgman@candle.pha.pa.us writes: I trimmed it down to: --with-prefer-libedit prefer libedit over readline OK, I can live with that. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0,

Re: [PATCHES] TODO item -- Improve psql's handling of multi-line queries

2005-12-01 Thread Bruce Momjian
Where are we on this patch? Was it submitted? Applied? Just an idea? --- Andreas Seltenreich wrote: Sergey E. Koposov writes: I'm proposing the small patch for the TODO item -- Improve psql's handling of

Re: [PATCHES] Numeric 508 datatype

2005-12-01 Thread Bruce Momjian
Where are we on this patch? It is ready for the patch queue? --- Simon Riggs wrote: Now we're into 8.2devel mode, its time to submit the previously discussed patch that: - reduces Numeric storage format by 2 bytes