modify to print log info

This commit is contained in:
Paul Trowbridge 2017-10-25 10:44:32 -04:00
parent 6056491ace
commit 65ee6d703b

View File

@ -16,11 +16,13 @@ DECLARE _t text;
DECLARE _c text; DECLARE _c text;
DECLARE _path text; DECLARE _path text;
DECLARE _srce text; DECLARE _srce text;
DECLARE _log_info text;
DECLARE _log_id text;
BEGIN BEGIN
_path := 'C:\users\fleet\downloads\dc1024.csv'; _path := 'C:\users\ptrowbridge\downloads\llcol.csv';
_srce := 'DCARD'; _srce := 'PNCL';
----------------------------------------------------build the column list of the temp table---------------------------------------------------------------- ----------------------------------------------------build the column list of the temp table----------------------------------------------------------------
@ -152,6 +154,7 @@ BEGIN
--------summarize records not inserted-------------------+------------------------------------------------------------------------------------------------ --------summarize records not inserted-------------------+------------------------------------------------------------------------------------------------
, logged AS (
INSERT INTO INSERT INTO
tps.trans_log (info) tps.trans_log (info)
SELECT SELECT
@ -173,7 +176,20 @@ BEGIN
FROM FROM
unmatched_keys unmatched_keys
) )
); )
RETURNING *
)
SELECT
id
,info
INTO
_log_id
,_log_info
FROM
logged;
RAISE NOTICE 'import logged under id# %, info: %', _log_id, _log_info;
END END
$$; $$;