Re: possible bug - Mailing list pgsql-general

From Adrian Klaver
Subject Re: possible bug
Date
Msg-id 454edd02-f3ab-4fa2-08e1-9658e27eaa0c@aklaver.com
Whole thread Raw
In response to possible bug  (Les <nagylzs@gmail.com>)
Responses Re: possible bug
List pgsql-general
On 10/21/22 10:50 AM, Les wrote:
> Hello,
> 
> We had a support request today, and we have narrowed down the problem to 
> a query that behaves very strangely. The actual query was much more 
> complicated, but I came up with this minimal example.
> 
> This is what we have seen inside our application:
> 
> select * from test where id in (26643094740, 26437091668);
> 
> id         |code|regno|col_3|
> -----------+----+-----+-----+
> 26437091668|TA-T| 2632|    1|
> 26643094740|PEG | 2905|    1|
> 
> select * from test where id = 26643094740;
> 
> id         |code|regno|col_3|
> -----------+----+-----+-----+
> 26643094740|PEG | 2905|    0|
> 
> The problem: value of col_3 changes for id=26643094740 if I query two 
> rows vs. one row. This is without changing any data. The problem is 100% 
> repeatable, if I query two rows from the same view, then I get different 
> data for one of the rows.
> 
> I suspect that this is a bug. But I might be wrong. Please help me!

I suspect an index problem. Have you tried reindexing the source table, 
kap.course if I am following correctly.

Have there been any issues with the database lately, e.g. crash or other 
significant event?

> 
> The actual test view looks like this:
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Les
Date:
Subject: possible bug
Next
From: Les
Date:
Subject: Re: possible bug