Re: BUG #18264: Table has type text, but query expects integer.attribute 1 of type record has wrong type - Mailing list pgsql-bugs

From Vojtěch Beneš
Subject Re: BUG #18264: Table has type text, but query expects integer.attribute 1 of type record has wrong type
Date
Msg-id 20240105183932.2D7B2BB4@centrum.cz
Whole thread Raw
In response to BUG #18264: Table has type text, but query expects integer.attribute 1 of type record has wrong type  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs

I am impressed with how quickly you addressed the issue. I tested queries myself on latest builds and issue is resolved. Also all errors we were getting in more complex queries are gone.


Thank you for your work.

Vojtěch

 

______________________________________________________________
> Od: "David Rowley" <dgrowleyml@gmail.com>
> Komu: "Tom Lane" <tgl@sss.pgh.pa.us>
> Datum: 04.01.2024 08:43
> Předmět: Re: BUG #18264: Table has type text, but query expects integer.attribute 1 of type record has wrong type
>

> CC: <pgsql-bugs@lists.postgresql.org> On Sun, 31 Dec 2023 at 16:24, David Rowley <dgrowleyml@gmail.com> wrote:
> It looks like the problem is in ExecEvalPreOrderedDistinctMulti(). It
> overwrites the tmpcontext's slots but fails to properly restore the
> originals again.

I pushed a slightly revised version of this.  I ended up adding a bool
isdistinct local variable so I didn't have to reset the slots in two
places.  It kinda makes it easier to see what the true and false
means, so that might have been a good change regardless of the bug.

Thanks for reporting this Vojtěch and for the reproducer script.

David

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18271: Re: Postgres policy exists bug
Next
From: Robert Haas
Date:
Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger