Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,11 @@
create or replace function struct_merge_patch(base, update) as (
<syntaxhighlight lang="sql">
with cte as (
from (select unnest(update))
positional join
(select COLUMNS(x -> x not in json_keys(update::JSON)) from (select unnest(base)))
)
select cte from cte
);
select struct_merge_patch( getvariable('base'), getvariable('update')) as merged;