--- /dev/null
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests.
+SELECT is(
+ (SELECT public.first(name) FROM config.copy_status WHERE id in (1,2,3)) ,
+ (SELECT name FROM config.copy_status WHERE id = 1),
+ 'testing having three rows; picking first row'
+);
+
+SELECT is(
+ (SELECT public.first(name) FROM config.copy_status WHERE id = 1) ,
+ (SELECT name FROM config.copy_status WHERE id = 1),
+ 'testing having one row; picking first row'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
\ No newline at end of file
--- /dev/null
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests.
+SELECT is(
+ public.first_agg(1,2),
+ 1,
+ 'testing having two interger parameters; picking first parameter'
+);
+
+SELECT is(
+ public.first_agg('1'::text,'2'::text),
+ '1',
+ 'testing having two string parameters; picking first parameter'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
\ No newline at end of file