Re: BUG #18092: Unexpected Result by enable_seqscan - Mailing list pgsql-bugs

From Francisco Olarte
Subject Re: BUG #18092: Unexpected Result by enable_seqscan
Date
Msg-id CA+bJJbwpv7mTRvSChWoADQHkHM0eU7KhhTap-tHcViphDFMzYQ@mail.gmail.com
Whole thread Raw
In response to BUG #18092: Unexpected Result by enable_seqscan  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18092: Unexpected Result by enable_seqscan
List pgsql-bugs
On Thu, 7 Sept 2023 at 09:10, PG Bug reporting form
<noreply@postgresql.org> wrote:
> The same query returns different results when enable_seqscan is changed:
> CREATE TABLE t0(c0 FLOAT);
> INSERT INTO t0(c0) VALUES(0.8);
> CREATE VIEW v0(c0) AS (SELECT 1);
> CREATE INDEX i0 ON t0(c0);
> UNLISTEN *;
> ANALYZE;
> INSERT INTO t0(c0) VALUES(0.1);
>
> SET enable_seqscan=on;
> SELECT DISTINCT ON (v0.c0) t0.c0 FROM v0, t0; -- {0.8}
> SET enable_seqscan=false;
> SELECT DISTINCT ON (v0.c0) t0.c0 FROM v0, t0; -- {0.1}

This seems a variation of your previous report. To me your queries
looks like you are asking Pg to "give me any row from this sets" and
then complaining when it does not give you the same under different
conditions.

Something like you put a red ball on the left of a table, a black one
on the right, ask me to pick one ball and then complain when I pick
the black when unconstrained and the red when constrained by "using
only your left hand".

Francisco Olarte.



pgsql-bugs by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: BUG #18091: Unexpected Result by enable_material
Next
From: Richard Guo
Date:
Subject: Re: BUG #18091: Unexpected Result by enable_material