One of the biggest hurdles to creating database unit tests is setting up
test data. test_factory makes that a lot easier by capturing test data
with a name and providing an easy way to recall it:
SELECT * FROM tf.get( NULL::customer, 'Base' );
customer_id | first_name | last_name
-------------+------------+-----------
1 | test_first | test_last
(1 row)
The blog post at
http://bluetreble.com/2015/09/test_factory/ goes into
more details. You can find it on PGXN at
http://pgxn.org/dist/test_factory/.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble!
http://BlueTreble.com