regression test using psql and grep
\! psql contrib_regression -c "/*+IndexScan(ti1 ti1_pred)*/ EXPLAIN (COSTS true) SELECT * FROM s1.ti1 WHERE c1 = 100" | grep -v "Planning time:"
I found that the regression test (e.g., ut-S.sql) tries to filter out the line
containing "Planning time:" from the result of EXPLAIN command,
in several places. But ISTM that this filtering is NOT necessary because
EXPLAIN basically doesn't output that line (but EXPLAIN ANALYZE does, though).
Therefore, shouldn't we remove psql and grep parts from the tests like
the above and just execute EXPLAIN command?
You're right. This is added in the commit 7cd601eb6e8d0dfa9ce9757626ac2c279698a4c7, where it supported 9.4 beta 2. Since that version of PostgreSQL emitted the "Planning time" for (COSTS true), the regression was changed so but it had been changed to the current shape as of 9.4.0 release. As the result, no release version of PostgreSQL emits "Planning time" for (COSTS true) so the greps should be removed.