Re: PostgreSQL unit tests - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PostgreSQL unit tests
Date
Msg-id 11558.1140620025@sss.pgh.pa.us
Whole thread Raw
In response to PostgreSQL unit tests  (Michael Glaesemann <grzm@myrealbox.com>)
List pgsql-hackers
Michael Glaesemann <grzm@myrealbox.com> writes:
> Something that has been briefly discussed in the past wrt PostgreSQL  
> has been unit testing to complement the current regression tests.  

I was and remain pretty dubious of this idea.  In the backend in
particular, there is very little code that could usefully be tested
in a stand-alone fashion.  For instance, almost everything assumes
the presence of palloc and elog and related facilities, and most
things depend at some level on having catalog data, and there are
lots of complicated, frequently-changed data structures involved in
the APIs.  I think you'd spend vastly more time constructing and
maintaining unit-test cases than would ever be repaid :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Dhanaraj
Date:
Subject: A doubt..
Next
From: "Pavel Stehule"
Date:
Subject: Request: set opclass for generated unique and primary key indexes