[BUGS] Bug #633: CASE statement evaluation does not short-circut

2002-04-14 Thread pgsql-bugs
James Cole (colejatmsu.edu) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description CASE statement evaluation does not short-circut Long Description In 7.2.1, Both the WHEN and THEN clauses of a CASE statement are evaluated, even if the WHEN clause evalu

Re: [BUGS] 7.2 crash...

2002-04-14 Thread Bruce Momjian
Here is a patch with a fix outlined by Tom: test=> CREATE OR REPLACE FUNCTION runMaintenance() test-> RETURNS BOOL AS ' test'> VACUUM; test'> SELECT TRUE; test'> ' LANGUAGE sql; CREATE test=> test=> select runMaintenanc

Re: [BUGS] 7.2 crash...

2002-04-14 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > *** src/backend/commands/vacuum.c 12 Apr 2002 20:38:25 - 1.223 > --- src/backend/commands/vacuum.c 14 Apr 2002 16:41:37 - > *** > *** 181,186 > --- 181,189 > if (IsTransactionBlock()) > elog(

Re: [BUGS] 7.2 crash...

2002-04-14 Thread Bruce Momjian
Oops, I see now. How is this? Remember, I am not incredibly capable, just persistent. :-) --- Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > *** src/backend/commands/vacuum.c 12 Apr 2002 20:38:25 -

Re: [BUGS] Bug #633: CASE statement evaluation does not short-circut

2002-04-14 Thread Tom Lane
[EMAIL PROTECTED] writes: > In 7.2.1, Both the WHEN and THEN clauses of a CASE statement are evaluated, even if >the WHEN clause evaluates to FALSE. Not in the normal case. > SELECT > CASE > WHEN 1 = 2 THEN 1 / 0 > WHEN 1 = 1 THEN 1.0 > END; > ERROR: floating point exce

Re: [BUGS] 7.2 crash...

2002-04-14 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Oops, I see now. How is this? Better. A comment explaining what the thing is doing would help too. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list a

Re: [BUGS] Bug #630: date/time storage problem: timestamp parsed

2002-04-14 Thread Sean Chittenden
> Ugh, I'm too tired to file a gdb report: > > 1490t = mktime(tmp); > (gdb) > 1491fprintf(stderr, "%p\n", t); > (gdb) print t > $7 = -1 > > Good call Tom. ... I'm going to file a PR w/ FreeBSD. The FreeBSD folk are absolutely adamant about having mktim

Re: [BUGS] Bug #597: ResultSet.next() throws NullPointerException

2002-04-14 Thread Bruce Momjian
This patch has been applied by someone recently. Thanks. --- [EMAIL PROTECTED] wrote: > Craig Brown ([EMAIL PROTECTED]) reports a bug with a severity of 2 > The lower the number the more severe it is. > > Short Descriptio