Re: Improving contrib/tablefunc's error reporting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improving contrib/tablefunc's error reporting
Date
Msg-id 1086983.1710016775@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improving contrib/tablefunc's error reporting  (Joe Conway <mail@joeconway.com>)
Responses Re: Improving contrib/tablefunc's error reporting
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> On 3/9/24 13:07, Tom Lane wrote:
>>> BTW, while I didn't touch it here, it seems fairly bogus that
>>> connectby() checks both type OID and typmod for its output
>>> columns while crosstab() only checks type OID.  I think
>>> crosstab() is in the wrong and needs to be checking typmod.
>>> That might be fit material for a separate patch though.

> Something like the attached what you had in mind? (applies on top of
> your two patches)

Yeah, exactly.

As far as the comment change goes:

-   * - attribute [1] of the sql tuple is the category; no need to check it -
-   * attribute [2] of the sql tuple should match attributes [1] to [natts]
+   * attribute [1] of the sql tuple is the category; no need to check it
+   * attribute [2] of the sql tuple should match attributes [1] to [natts - 1]
    * of the return tuple

I suspect that this block looked better when originally committed but
didn't survive contact with pgindent.  You should check whether your
version will; if not, some dashes on the /* line will help.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Improving contrib/tablefunc's error reporting
Next
From: Melanie Plageman
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum