The following is an example on how to add a new column source
depending on the origin query
SELECT code, url, 'TABLE_1' AS source
FROM my_schema.table1
WHERE code = $1
UNION ALL
SELECT code, url, 'TABLE_2' AS source
FROM my_schema.table2
WHERE code = $1