pg
pg copied to clipboard
can't read standard out
I need to execute an .sql script that raises a notice and I need to catch this text and evaluate.
can pg capable of returning the standard out sql?
I am not able to modify this incoming .sql, but here it is:
DO $$
DECLARE
pl_scriptname VARCHAR := 'verify_duplicate_wfdraft';
BEGIN
RAISE NOTICE '%: No duplicate records found.',pl_scriptname;
END $$;
go-pg discards notices in https://github.com/go-pg/pg/blob/master/messages.go#L1268-L1271