Thread: [COMMITTERS] pgsql: Make PostgresNode easily subclassable

[COMMITTERS] pgsql: Make PostgresNode easily subclassable

From
Alvaro Herrera
Date:
Make PostgresNode easily subclassable

This module becomes much more useful if we allow it to be used as base
class for external projects.  To achieve this, change the exported
get_new_node function into a class method instead, and use the standard
Perl idiom of accepting the class as first argument.  This method works
as expected for subclasses.  The standalone function is kept for
backwards compatibility, though it could be removed in pg11.

Author: Chap Flackman, based on an earlier patch from Craig Ringer
Discussion: https://postgr.es/m/CAMsr+YF8kO+4+K-_U4PtN==2FndJ+5Bn6A19XHhMiBykEwv0wA@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3b7bbee7b661536713df3f6c93a8f446bdbfd0ae

Modified Files
--------------
src/test/perl/PostgresNode.pm | 20 ++++++++++++--------
src/test/perl/README          |  2 +-
2 files changed, 13 insertions(+), 9 deletions(-)