== pgTAP
-- The follow runs but fails.
\set payload '\'{"foo":"bar"}\''
\set result '\'well well\''
\set expectedResult '\'{"cheese": "good stuff!"}\''
call doit(:payload::json, :result::text);
SELECT matches (:result::text, :expectedResult::text, 'as expected!');
-- the output:
not ok 3 - as expected!
# Failed test 3: "as expected!"
# 'well well'
# doesn't match: '{"cheese": "good stuff!"}'
# Looks like you failed 1 test of 3
Failed 1/3 subtests
When I call the PL/pgSQL Stored Procedure from psql or pgAdmin, the parameter 'result' contains the value in 'expectedResult' after the call completes.
Questions:
- Am I correctly passing the INOUT parameter 'result'?
- Am I correctly reading the INOUT parameter 'result' after the call completes?
- Am I doing something else wrong?
Thanks!