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