"Jim Dew" <[EMAIL PROTECTED]> writes:
> Stumbled upon a (broken) query that causes the 8.1.0 thread handling the
> query to die:
> select foo from (select null) as foo

Fixed in 8.0 and up.  If you need the patch for 8.1, it's pretty simple:

Index: src/backend/executor/execQual.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/executor/execQual.c,v
retrieving revision 1.183.2.1
diff -c -r1.183.2.1 execQual.c
*** src/backend/executor/execQual.c     22 Nov 2005 18:23:08 -0000      
1.183.2.1
--- src/backend/executor/execQual.c     14 Dec 2005 16:25:05 -0000
***************
*** 541,547 ****
        Assert(variable->varno != OUTER);
        slot = econtext->ecxt_scantuple;
  
!       tuple = slot->tts_tuple;
        tupleDesc = slot->tts_tupleDescriptor;
  
        /*
--- 541,547 ----
        Assert(variable->varno != OUTER);
        slot = econtext->ecxt_scantuple;
  
!       tuple = ExecFetchSlotTuple(slot);
        tupleDesc = slot->tts_tupleDescriptor;
  
        /*

Thanks for the report!

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to