SELECT do not return all rows depending on selected columns

From: Fabrice LEGROS <fabrice(dot)legros(at)abbd(dot)fr>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: SELECT do not return all rows depending on selected columns
Date: 2019-01-04 15:18:31
Message-ID: DB6PR0301MB2552152ABBF61DAF79156B83938E0@DB6PR0301MB2552.eurprd03.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

In attachment, there is 2 files :

* init.sql to create and fill a table
* request.sql with a select on this table

The request return 2122 rows, if I remove the second column (v2.journalcode) from the select I get 2801 rows (which is the expected result).
Tested on "PostgreSQL 9.6.10 on x86_64-pc-linux-gnu (Debian 9.6.10-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit"

Also tested on "PostgreSQL 10.5 (Debian 10.5-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit"
Same behavior, but with 2133 rows for the select with 2 columns.

Regards,
Fabrice Legros.

Attachment Content-Type Size
testdata.7z application/octet-stream 57.0 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2019-01-04 15:43:37 Re: Is temporary functions feature official/supported? Found some issues with it.
Previous Message Tom Lane 2019-01-04 14:54:39 Re: Is temporary functions feature official/supported? Found some issues with it.