perltidy tweaks

Started by Peter Eisentrautover 8 years ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t38615
psql -h localhost -U postgres

Built from patchset v1 (message #1), July 27, 2026 at 08:32 PM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t38615_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t38615_1 && git checkout t38615_1

Patchset v1 (message #1) is on t38615_1

Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

I prpose two tweaks for the perltidy configuration:

- The new perltidy version can avoid writing backup files, so we don't
need to explicitly delete them after.

- Use option --nooutdent-long-quotes. This is similar to a change we
made for pgindent in the C code a while ago. See patch for the results.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

t38615_1
0001-perltidy-Don-t-write-backup-files.patchtext/plain; charset=UTF-8; name=0001-perltidy-Don-t-write-backup-files.patch; x-mac-creator=0; x-mac-type=0Download+1-4
0002-perltidy-Add-option-nooutdent-long-quotes.patchtext/plain; charset=UTF-8; name=0002-perltidy-Add-option-nooutdent-long-quotes.patch; x-mac-creator=0; x-mac-type=0Download+294-288
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: perltidy tweaks

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

I prpose two tweaks for the perltidy configuration:
- The new perltidy version can avoid writing backup files, so we don't
need to explicitly delete them after.

+1

- Use option --nooutdent-long-quotes. This is similar to a change we
made for pgindent in the C code a while ago. See patch for the results.

No strong opinion as to whether to do that or not, but if we do, I wonder
if we shouldn't also select --nooutdent-long-comments. I noticed a few
places where it was doing that (ie moving comments left if they went past
the right margin) and didn't particularly like it.

What would be more per project style is to reflow overly-wide comments
into multiple lines, but I don't see an option for that :-(

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: perltidy tweaks

On 04/26/2018 12:33 PM, Tom Lane wrote:

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:

I prpose two tweaks for the perltidy configuration:
- The new perltidy version can avoid writing backup files, so we don't
need to explicitly delete them after.

+1

+1

- Use option --nooutdent-long-quotes. This is similar to a change we
made for pgindent in the C code a while ago. See patch for the results.

No strong opinion as to whether to do that or not, but if we do, I wonder
if we shouldn't also select --nooutdent-long-comments. I noticed a few
places where it was doing that (ie moving comments left if they went past
the right margin) and didn't particularly like it.

Yeah, not a fan of the outdenting, so +1 to both of these.

What would be more per project style is to reflow overly-wide comments
into multiple lines, but I don't see an option for that :-(

Right. Maybe we need a script that at least identifies them for us.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#3)
Re: perltidy tweaks

On 4/26/18 14:10, Andrew Dunstan wrote:

- Use option --nooutdent-long-quotes. This is similar to a change we
made for pgindent in the C code a while ago. See patch for the results.

No strong opinion as to whether to do that or not, but if we do, I wonder
if we shouldn't also select --nooutdent-long-comments. I noticed a few
places where it was doing that (ie moving comments left if they went past
the right margin) and didn't particularly like it.

Yeah, not a fan of the outdenting, so +1 to both of these.

committed all three

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services