vault backup: 2023-11-07 01:37:40

This commit is contained in:
Paul Trowbridge 2023-11-07 01:37:40 -05:00
parent 193b489e62
commit d048a1fac6

View File

@ -15,6 +15,8 @@ DECLARE
_cust text; _cust text;
_v1ds text; _v1ds text;
_v0ds text; _v0ds text;
_v1tp jsonb;
_v0tp jsonb;
_chan text; _chan text;
_regn text; _regn text;
_rslt jsonb; _rslt jsonb;
@ -71,7 +73,7 @@ BEGIN
stdev_price stdev_price
) )
INTO INTO
_targ _v0tp
FROM FROM
pricequote.market_setavgprice pricequote.market_setavgprice
WHERE WHERE
@ -79,6 +81,7 @@ BEGIN
AND season = _seas AND season = _seas
AND data_segment = _v0ds AND data_segment = _v0ds
AND region = 'ALL'; AND region = 'ALL';
_rslt := _rslt||COALESCE(_v0tp,'{}'::jsonb);
----------------target pricing------------------------------ ----------------target pricing------------------------------
SELECT SELECT
jsonb_build_object( jsonb_build_object(
@ -88,7 +91,7 @@ BEGIN
stdev_price stdev_price
) )
INTO INTO
_targ _v1tp
FROM FROM
pricequote.market_setavgprice pricequote.market_setavgprice
WHERE WHERE
@ -97,7 +100,7 @@ BEGIN
AND data_segment = _v1ds AND data_segment = _v1ds
AND region = 'ALL'; AND region = 'ALL';
--RAISE NOTICE 'target: %', jsonb_pretty(_targ); --RAISE NOTICE 'target: %', jsonb_pretty(_targ);
_rslt := _rslt||COALESCE(_targ,'{}'::jsonb); _rslt := _rslt||COALESCE(_v1tp,'{}'::jsonb);
----------------inflation index----------------------------- ----------------inflation index-----------------------------
SELECT SELECT