Re: Error when defining a set returning function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Error when defining a set returning function
Date
Msg-id 4164389.1618592650@sss.pgh.pa.us
Whole thread Raw
In response to Re: Error when defining a set returning function  (Esteban Zimanyi <ezimanyi@ulb.ac.be>)
Responses Re: Error when defining a set returning function  (Esteban Zimanyi <ezimanyi@ulb.ac.be>)
List pgsql-hackers
Esteban Zimanyi <ezimanyi@ulb.ac.be> writes:
> When debugging the function with gdb, I noticed that the rsinfo variable of
> the PostgreSQL function ExecMakeFunctionResultSet  is modified in the
> macro  SRF_RETURN_NEXT causing the problem. Any idea how to solve this?

Well, what SRF_RETURN_NEXT thinks it's doing is

        rsi->isDone = ExprMultipleResult; \

which surely shouldn't change the returnMode field.  At this point
I'm guessing that you are compiling the PG headers with some compiler
pragma that changes the struct packing rules.  Don't do that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bogus collation version recording in recordMultipleDependencies
Next
From: Andres Freund
Date:
Subject: Re: Bogus collation version recording in recordMultipleDependencies