Re: [BUGS] Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions

2012-03-19 Thread Claus Stadler
Cool, thank you very much. Cheers, Claus On 03/16/2012 06:17 PM, Tom Lane wrote: Claus Stadler writes: Filtering a Union on constant custom type: ... Expected: Query optimizer should discard the scan as filter cannot be satisfied. I've applied a patch for this. Thanks for the report!

Re: [BUGS] Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions

2012-03-16 Thread Tom Lane
Claus Stadler writes: > Filtering a Union on constant custom type: > ... > Expected: Query optimizer should discard the scan as filter cannot be > satisfied. I've applied a patch for this. Thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (p

Re: [BUGS] Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions

2012-03-11 Thread Tom Lane
Claus Stadler writes: > Hi, not sure if this bug is already known, so sorry if it is ;) > Filtering a Union on constant custom type: This seems to be another unpleasant consequence of http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=57664ed25e5dea117158a2e663c29e60b3546e1c I'm s

[BUGS] Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions

2012-03-03 Thread Claus Stadler
Hi, not sure if this bug is already known, so sorry if it is ;) This is about an issue of the optimizer when having a union of selects that yield columns of constant value. The first minimal example shows a regression, the second one a missed optimization. Cheers, Claus Example 1: Filteri

[BUGS] Regression from 8.4 to 9.1.2/9.1.3: Optimizing filters on constants in unions

2012-03-02 Thread Claus Stadler
Hi, not sure if this bug is already known, so sorry if it is ;) Filtering a Union on constant custom type: --- DROP VIEW v; DROP TABLE a; DROP TABLE b; DROP TYPE IF EXISTS mytype; CREATE TYPE mytype AS ENUM ('x', 'y');