Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue