From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Rumpi Gravenstein <rgravens(at)gmail(dot)com> |
Cc: | PostgreSQL <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Analytic Function Bug |
Date: | 2024-08-30 01:24:17 |
Message-ID: | CAApHDvr0par1jqFJQPbewoqjuFUNQQXs5X+dPVQDxcwkvW_mvA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 30 Aug 2024 at 11:18, Rumpi Gravenstein <rgravens(at)gmail(dot)com> wrote:
>
> Which returns:
> logical_partition_keyusage_texttxtrpo_txtindxmx_indxprvnxtnxt2prv2prv3
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" "F" "1" "7" *"F"* "(" "(" "[NULL]"
> "[NULL]"
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" "(" "2" "7" "F" "(" "T61" "F" "[NULL]"
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" "T61" "3" "7" *"T61"* ")" ")" "(" "("
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" ")" "4" "7" "T61" ")" "(" "T61" "("
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" "(" "5" "7" "*("* "EXPORT" "EXPORT" ")"
> ")"
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" "EXPORT" "6" "7" "(" "EXPORT" ")" "("
> ")"
> "TEST_DATA"
> "F(T61)(EXPORT)" "F(T61)(EXPORT)" ")" "7" "7" ")" "[NULL]" "[NULL]"
> "EXPORT" "EXPORT"
> Notice that the prv column (lag - 1 ) is just wrong. I've highlighted
> obvious bad values. Other columns are wrong as well.
>
> Is this a PostgreSQL bug?
>
FWIW, these aren't the results I see when executing your query on 14.13.
I'm not sure what interface you're using to get those tables, but let's
eliminate some buggy GUI and use psql instead.
I've attached a script, could you send us back the output of it with
something like?: psql -f lag_query.sql > lagscript.txt
I've included a query to give us the EXPLAIN ANALYZE output too. The WHERE
clause quals shouldn't get pushed down since the PARTITION BY clause does
not contain all of those fields.
David
Attachment | Content-Type | Size |
---|---|---|
lag_query.sql | application/octet-stream | 3.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Morris de Oryx | 2024-08-30 01:51:51 | Remedial C: Does an ltree GiST index *ever* set recheck to true? |
Previous Message | Tom Lane | 2024-08-30 00:07:13 | Re: Analytic Function Bug |