How can I include sql file in pgTAP unittest?

2018-03-02 Thread Stéphane Klein
foobar' ); In log I see that "init.sql" file is loaded with success: Running tests: /test/*.sql -v /test/init.sql ... No subtests run But I have this error: ERROR: user mapping not found for "db2" Question: where is my mistake? How can I include some sql

Re: How can I include sql file in pgTAP unittest?

2018-03-02 Thread Stéphane Klein
2018-03-02 14:52 GMT+01:00 Adrian Klaver : > On 03/02/2018 01:17 AM, Stéphane Klein wrote: > >> Hi, >> >> context: I would like to write UnitTest to test pgSQL triggers which use >> postgres_fdw extension. >> I use pgTAP <http://pgtap.org/> to write this

Do you know a json_populate_record alternative method to create a ROW with a named field notation?

2022-03-06 Thread Stéphane Klein
sing a json format? I know the `ROW` syntax expression: ``` postgres=# SELECT ROW('John', 'Doe')::contact; row (John,Doe) (1 row) ``` But I didn't find a `ROW` constructors ( https://www.postgresql.org/docs/13/sql-expressions.html#SQL-SYNTAX-ROW-C