pg icon indicating copy to clipboard operation
pg copied to clipboard

can't read standard out

Open nicks6240 opened this issue 4 years ago • 2 comments

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?

nicks6240 avatar Mar 19 '20 19:03 nicks6240

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 $$;

nicks6240 avatar Mar 19 '20 19:03 nicks6240

go-pg discards notices in https://github.com/go-pg/pg/blob/master/messages.go#L1268-L1271

vmihailenco avatar Mar 20 '20 05:03 vmihailenco