pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Set readline-relevant ENV vars in interactive_psql(), not caller 2+ messages / 1 participants [nested] [flat]
* pgsql: Set readline-relevant ENV vars in interactive_psql(), not caller @ 2023-12-23 16:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2023-12-23 16:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Set readline-relevant ENV vars in interactive_psql(), not caller. Commit 664d75753 pulled 010_tab_completion.pl's infrastructure for invoking an interactive psql session out into a generally-useful test function, but it didn't move enough stuff. We need to set up various environment variables that readline will look at, both to ensure stability of test results and to prevent test actions from cluttering the calling user's ~/.psql_history. Expecting calling scripts to remember to do that is too failure-prone: the other existing caller 001_password.pl did not do it. Hence, remove those initialization steps from 010_tab_completion.pl and put them into interactive_psql(). Since interactive_psql was already making a local ENV hash, this has no effect on calling scripts. Discussion: https://postgr.es/m/794610.1703182896@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/da44ff312ea3b2868b8fab68944017cb56427709 Modified Files -------------- src/bin/psql/t/010_tab_completion.pl | 26 ++++++-------------------- src/test/perl/PostgreSQL/Test/Cluster.pm | 28 ++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 22 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Set readline-relevant ENV vars in interactive_psql(), not caller @ 2023-12-23 16:50 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2023-12-23 16:50 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Set readline-relevant ENV vars in interactive_psql(), not caller. Commit 664d75753 pulled 010_tab_completion.pl's infrastructure for invoking an interactive psql session out into a generally-useful test function, but it didn't move enough stuff. We need to set up various environment variables that readline will look at, both to ensure stability of test results and to prevent test actions from cluttering the calling user's ~/.psql_history. Expecting calling scripts to remember to do that is too failure-prone: the other existing caller 001_password.pl did not do it. Hence, remove those initialization steps from 010_tab_completion.pl and put them into interactive_psql(). Since interactive_psql was already making a local ENV hash, this has no effect on calling scripts. Discussion: https://postgr.es/m/794610.1703182896@sss.pgh.pa.us Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/11652f919d44f865aa21e85c99fcd070bb36d883 Modified Files -------------- src/bin/psql/t/010_tab_completion.pl | 26 ++++++-------------------- src/test/perl/PostgreSQL/Test/Cluster.pm | 28 ++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 22 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-12-23 16:50 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-12-23 16:50 pgsql: Set readline-relevant ENV vars in interactive_psql(), not caller Tom Lane <tgl@sss.pgh.pa.us> 2023-12-23 16:50 pgsql: Set readline-relevant ENV vars in interactive_psql(), not caller Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox