passing diff options to pg_regress
I sometimes find it useful to view a regression test difference using
other diff options, such as -u -w or more context. There is currently
no easy way to accomplish that.
I suggest allowing to override the diff options using an environment
variable, such as PG_REGRESS_DIFF_OPTS. The patch is very small.
Attachments:
pg-regress-diff-opts.patchtext/x-patch; charset=UTF-8; name=pg-regress-diff-opts.patchDownload
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 1668119..96ba79c 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -1970,6 +1970,9 @@
*/
ifunc();
+ if (getenv("PG_REGRESS_DIFF_OPTS"))
+ pretty_diff_opts = getenv("PG_REGRESS_DIFF_OPTS");
+
while ((c = getopt_long(argc, argv, "hV", long_options, &option_index)) != -1)
{
switch (c)
On 2013-01-14 06:57:52 -0500, Peter Eisentraut wrote:
I sometimes find it useful to view a regression test difference using
other diff options, such as -u -w or more context. There is currently
no easy way to accomplish that.I suggest allowing to override the diff options using an environment
variable, such as PG_REGRESS_DIFF_OPTS. The patch is very small.
+ERANGE
I usually do this by manually doing the diff, but thats pretty annoying.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Mon, Jan 14, 2013 at 6:57 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
I sometimes find it useful to view a regression test difference using
other diff options, such as -u -w or more context. There is currently
no easy way to accomplish that.I suggest allowing to override the diff options using an environment
variable, such as PG_REGRESS_DIFF_OPTS. The patch is very small.
Great idea.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Hi Peter,
Idea is really very good.
About the patch:
Patch looks good to me.
Applied cleanly on latest sources. make / make install / make check /
initdb everything works well.
Tested with few options and it is working well.
However, I think you need to add this in docs. Letting people know about
this environment variable to make use of that.
Thanks
On Wed, Jan 16, 2013 at 1:21 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Mon, Jan 14, 2013 at 6:57 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
I sometimes find it useful to view a regression test difference using
other diff options, such as -u -w or more context. There is currently
no easy way to accomplish that.I suggest allowing to override the diff options using an environment
variable, such as PG_REGRESS_DIFF_OPTS. The patch is very small.Great idea.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--
Jeevan B Chalke
Senior Software Engineer, R&D
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91 20 30589500
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the
individual or entity to whom it is addressed. This message contains
information from EnterpriseDB Corporation that may be privileged,
confidential, or exempt from disclosure under applicable law. If you are
not the intended recipient or authorized to receive this for the intended
recipient, any use, dissemination, distribution, retention, archiving, or
copying of this communication is strictly prohibited. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete this message.
On Wed, 2013-01-16 at 14:35 +0530, Jeevan Chalke wrote:
However, I think you need to add this in docs. Letting people know
about this environment variable to make use of that.
Done and committed. Thanks.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers