Clean up ancient test style

Started by Peter Eisentrautover 5 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

Many older tests where written in a style like

SELECT '' AS two, i.* FROM INT2_TBL ...

where the first column indicated the number of expected result rows.
This has gotten increasingly out of date, as the test data fixtures
have expanded, so a lot of these don't match anymore and are misleading.
Moreover, this style isn't really necessary, since the psql output
already shows the number of result rows. (Perhaps this was different at
some point?)

I'm proposing to clean all this up by removing all those extra columns.

The patch is very big, so I'm attaching a compressed version. You can
also see a diff oneline:
https://github.com/postgres/postgres/compare/master...petere:test-cleanup

Attachments:

0001-Clean-up-ancient-test-style.patch.gzapplication/x-gzip; name=0001-Clean-up-ancient-test-style.patch.gzDownload+1-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: Clean up ancient test style

Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:

Many older tests where written in a style like
SELECT '' AS two, i.* FROM INT2_TBL ...

where the first column indicated the number of expected result rows.
This has gotten increasingly out of date, as the test data fixtures
have expanded, so a lot of these don't match anymore and are misleading.
Moreover, this style isn't really necessary, since the psql output
already shows the number of result rows. (Perhaps this was different at
some point?)

I'm proposing to clean all this up by removing all those extra columns.

+1 for concept ... I didn't bother to check the patch in detail.

regards, tom lane