potentially missed pgindent in REL_19_STABLE
potentially missed pgindent in REL_19_STABLE
Hi,
I wonder if I'm the only one seeing $subject, like this:
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 6fb31430a3a..e98bb1ae450 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -4716,9 +4716,10 @@ text_right(PG_FUNCTION_ARGS)
if (n < 0)
{
/*
- * Negating PG_INT32_MIN would overflow, so clamp instead. Any n whose
- * absolute value is at least the string's length skips the whole
- * string, and len can't exceed PG_INT32_MAX, so this is equivalent.
+ * Negating PG_INT32_MIN would overflow, so clamp instead. Any n
+ * whose absolute value is at least the string's length skips the
+ * whole string, and len can't exceed PG_INT32_MAX, so this is
+ * equivalent.
*/
if (unlikely(n == PG_INT32_MIN))
n = PG_INT32_MAX;
Does anyone object to applying the attached to fix that?
--
Thanks, Amit Langote
Re: potentially missed pgindent in REL_19_STABLE
От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 24 Sep 2026, at 10:23, Amit Langote wrote: > I wonder if I'm the only one seeing $subject, like this: > ... > Does anyone object to applying the attached to fix that? I did see it, but it was during a freeze and then it slipped my mind. Shipping a pgindent clean tree clearly has value, will there would be a tree-wide pgindent run before tagging REL_19_0? -- Daniel Gustafsson
Re: potentially missed pgindent in REL_19_STABLE
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Thu, Sep 24, 2026 at 5:33 PM Daniel Gustafsson wrote: > > On 24 Sep 2026, at 10:23, Amit Langote wrote: > > > I wonder if I'm the only one seeing $subject, like this: > > ... > > Does anyone object to applying the attached to fix that? > > I did see it, but it was during a freeze and then it slipped my mind. Shipping > a pgindent clean tree clearly has value, I hadn't realized that koel's pgindent check only covers master. I run pgindent on each branch before pushing, so I noticed this hunk a few times recently and thought I'd ask. > will there would be a tree-wide > pgindent run before tagging REL_19_0? That's a good question. src/tools/RELEASE_CHANGES mentions runs before beta and before branching, but I couldn't find anything about a final run before .0. I'm happy to hold off if another run is planned, or if we don't think this cleanup is needed for 19.0. -- Thanks, Amit Langote
Re: potentially missed pgindent in REL_19_STABLE
От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 24 Sep 2026, at 12:28, Amit Langote wrote: > > On Thu, Sep 24, 2026 at 5:33 PM Daniel Gustafsson wrote: >>> On 24 Sep 2026, at 10:23, Amit Langote wrote: >> >>> I wonder if I'm the only one seeing $subject, like this: >>> ... >>> Does anyone object to applying the attached to fix that? >> >> I did see it, but it was during a freeze and then it slipped my mind. Shipping >> a pgindent clean tree clearly has value, > > I hadn't realized that koel's pgindent check only covers master. I run > pgindent on each branch before pushing, so I noticed this hunk a few > times recently and thought I'd ask. Same here, I have no explanation for why I missed this time =/. >> will there would be a tree-wide >> pgindent run before tagging REL_19_0? > > That's a good question. src/tools/RELEASE_CHANGES mentions runs before > beta and before branching, but I couldn't find anything about a final > run before .0. > > I'm happy to hold off if another run is planned, or if we don't think > this cleanup is needed for 19.0. Perhaps it's best to do it now to make sure it isn't lost again, but I have no strong opinions. -- Daniel Gustafsson
Re: potentially missed pgindent in REL_19_STABLE
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Thu, Sep 24, 2026 at 8:28 PM Daniel Gustafsson wrote: > > On 24 Sep 2026, at 12:28, Amit Langote wrote: > > > > On Thu, Sep 24, 2026 at 5:33 PM Daniel Gustafsson wrote: > >>> On 24 Sep 2026, at 10:23, Amit Langote wrote: > >> > >>> I wonder if I'm the only one seeing $subject, like this: > >>> ... > >>> Does anyone object to applying the attached to fix that? > >> > >> I did see it, but it was during a freeze and then it slipped my mind. Shipping > >> a pgindent clean tree clearly has value, > > > > I hadn't realized that koel's pgindent check only covers master. I run > > pgindent on each branch before pushing, so I noticed this hunk a few > > times recently and thought I'd ask. > > Same here, I have no explanation for why I missed this time =/. > > >> will there would be a tree-wide > >> pgindent run before tagging REL_19_0? > > > > That's a good question. src/tools/RELEASE_CHANGES mentions runs before > > beta and before branching, but I couldn't find anything about a final > > run before .0. > > > > I'm happy to hold off if another run is planned, or if we don't think > > this cleanup is needed for 19.0. > > Perhaps it's best to do it now to make sure it isn't lost again, but I have no > strong opinions. OK, I'll push this tomorrow unless there are any objections. Thanks for chiming in. -- Thanks, Amit Langote
Re: potentially missed pgindent in REL_19_STABLE
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Amit Langote writes: > On Thu, Sep 24, 2026 at 5:33 PM Daniel Gustafsson wrote: >> will there would be a tree-wide >> pgindent run before tagging REL_19_0? > That's a good question. src/tools/RELEASE_CHANGES mentions runs before > beta and before branching, but I couldn't find anything about a final > run before .0. We haven't done that in the past, and in general I don't think it's policy to expect full pgindent cleanliness in back branches. One reason for that is that back-patches typically retain the master-branch patch's formatting, even if an older version of pgindent would have done something different with some constructs. For instance, commit b518ba4af affected a lot of places, making it hard to say which handling of "..." is right for pre-v19. So now you'd likely get diffs from a tree-wide reindent in v18 and before no matter which pgindent version you used. I have no objection to applying the proposed patch, though. At this point there's still value in avoiding unnecessary diffs between v19 and v20. regards, tom lane
Re: potentially missed pgindent in REL_19_STABLE
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Thu, Sep 24, 2026 at 11:13 PM Tom Lane wrote: > Amit Langote writes: > > On Thu, Sep 24, 2026 at 5:33 PM Daniel Gustafsson wrote: > >> will there would be a tree-wide > >> pgindent run before tagging REL_19_0? > > > That's a good question. src/tools/RELEASE_CHANGES mentions runs before > > beta and before branching, but I couldn't find anything about a final > > run before .0. > > We haven't done that in the past, and in general I don't think > it's policy to expect full pgindent cleanliness in back branches. > One reason for that is that back-patches typically retain the > master-branch patch's formatting, even if an older version of > pgindent would have done something different with some constructs. > > For instance, commit b518ba4af affected a lot of places, making it > hard to say which handling of "..." is right for pre-v19. So now > you'd likely get diffs from a tree-wide reindent in v18 and before > no matter which pgindent version you used. > > I have no objection to applying the proposed patch, though. > At this point there's still value in avoiding unnecessary > diffs between v19 and v20. Thanks, applied. -- Thanks, Amit Langote