wrong query result with jit_above_cost= 0 - Mailing list pgsql-hackers

From Rushabh Lathia
Subject wrong query result with jit_above_cost= 0
Date
Msg-id CAGPqQf165-=+Drw3Voim7M5EjHT1zwPF9BQRjLFQzCzYnNZEiQ@mail.gmail.com
Whole thread Raw
Responses Re: wrong query result with jit_above_cost= 0
List pgsql-hackers
Hi,

I found the below query which returns the wrong output
when jit_above_cost= 0 is set.

Steps to reproduce:

CREATE TABLE emp (
    epno           NUMERIC(4),
    ename           VARCHAR(10),
    job             VARCHAR(9),
    mgr             NUMERIC(4),
    hiredate        DATE,
    sal             NUMERIC(7,2),
    comm            NUMERIC(7,2),
    deptno          NUMERIC(2)
);

INSERT INTO emp VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);
INSERT INTO emp VALUES (7499,'ALLEN','SALESMAN',7698,'20-FEB-81',1600,300,30);

set jit_above_cost= 0;

select max(epno) from emp group by rollup((deptno,epno)) order by 1 asc;

without the ROLLUP, I don't see any problem with results.

Thanks,
Rushabh Lathia

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: postgresql_fdw doesn't handle defaults correctly
Next
From: AJG
Date:
Subject: Re: Global shared meta cache