public inbox for [email protected]
help / color / mirror / Atom feedFrom: Oleg Tselebrovskiy <[email protected]>
To: Soumya S Murali <[email protected]>
Cc: [email protected]
Subject: Re: 001_password.pl fails with --without-readline
Date: Wed, 14 Jan 2026 17:11:11 +0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAMtXxw_kvxZPMnUu5dgTyVwRhwgaFDXAMW4UwhOuUURKHT6U1Q@mail.gmail.com>
<[email protected]>
The easiest way to fix 030_pager.pl is to just replace ' ' with '*'
in regex. With readline, everything that we look for is placed on
its own line so we don't break anything, but --without-readline
produces the following output (with some hand-written debug info):
IPC::Run 0000 [#2(438962)]: ** pumping
IPC::Run 0000 [#2(438962)]: read( 11 ) = 4 chars '39
IPC::Run 0000 [#2(438962)]: '
stream:postgres=# \pset expanded
SELECT generate_series(1,20) as g;
Expanded display is on.
postgres=# 39
So the output that is turned on with IPCRUNDEBUG=data shows us "we got
only 4 chars, '39\n\0'!", but in reality we have more stuff in stream,
so pump_until() function doesn't match with passed regex
Patch is attached
Regards,
Oleg
Attachments:
[text/x-diff] v2-0002-030-pager-fix.patch (804B, ../[email protected]/2-v2-0002-030-pager-fix.patch)
download | inline diff:
diff --git a/src/bin/psql/t/030_pager.pl b/src/bin/psql/t/030_pager.pl
index cf81fb1603c..3e34ae1a16f 100644
--- a/src/bin/psql/t/030_pager.pl
+++ b/src/bin/psql/t/030_pager.pl
@@ -85,17 +85,17 @@ do_command(
do_command(
"SELECT 'test' AS t FROM generate_series(1,24);\n",
- qr/^ *24\r?$/m,
+ qr/^.*24\r?$/m,
"execute SELECT query that needs pagination");
do_command(
"\\pset expanded\nSELECT generate_series(1,20) as g;\n",
- qr/^ *39\r?$/m,
+ qr/^.*39\r?$/m,
"execute SELECT query that needs pagination in expanded mode");
do_command(
"\\pset tuples_only off\n\\d+ information_schema.referential_constraints\n",
- qr/^ *\d+\r?$/m,
+ qr/^.*\d+\r?$/m,
"execute command with footer that needs pagination");
# send psql an explicit \q to shut it down, else pty won't close properly
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: 001_password.pl fails with --without-readline
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox