Skip site navigation (1) Skip section navigation (2)

BUG #5182: query with deferents results

From: "artur saldanha" <artur(dot)saldanha(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5182: query with deferents results
Date: 2009-11-12 18:09:27
Message-ID: 200911121809.nACI9RaL094848@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      5182
Logged by:          artur saldanha
Email address:      artur(dot)saldanha(at)gmail(dot)com
PostgreSQL version: 8.3.5
Operating system:   Fedora 64
Description:        query with  deferents results
Details: 

PostgreSQL 8.3.5 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.3.2
20081007 (Red Hat 4.3.2-6
this query presents 7 rows...
SELECT *
   FROM ( (SELECT n.nrnota, i.cdproduto, i.qtde as batata, i.vrpunit,
n.cdfinalidade, cdnrnota
           FROM nfiscais n
      JOIN itnfiscais i ON n.cnnota = i.cnnota
     WHERE n.cdfinalidade = '5A7'::bpchar AND n.status = '131'::bpchar)
UNION 
         (SELECT n.nrnotaorigem AS nrnota, i.cdproduto, i.qtde *
(-1)::numeric AS batata, i.vrpunit, n.cdfinalidade, cdnrnota
           FROM nfiscais n
      JOIN itnfiscais i ON n.cnnota = i.cnnota
     WHERE n.cdfinalidade = '5A8'::bpchar AND n.status = '131'::bpchar)) q
where nrnota = '009426'  

same query that omit a colum cdnrnota present only 3 rows..
the rows omitted are in second query and rows omitted are equal contents.

Responses

pgsql-bugs by date

Next:From: Yury DonDate: 2009-11-12 18:14:02
Subject: BUG #5183: Wrong select results using multicolumn gin indexes
Previous:From: Artur SaldanhaDate: 2009-11-12 18:04:14
Subject: BUG #5181: query with deferents results

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group