Commit 58c3103b authored by Alice Salsé's avatar Alice Salsé
Browse files

👌 set default value

parent 959653f5
......@@ -43,7 +43,7 @@ begin
for _def_value in EXECUTE FORMAT ('SELECT * FROM %1$I.default_value
where (tablename=%2$L or tablename=''_all'')
and (%3$L::jsonb @> objectdef::jsonb or objectdef is null);'
,(parse_ident(i_regclass::text))[1], (parse_ident(i_regclass::text))[2], _new::text) LOOP
,TG_TABLE_SCHEMA, _table, _new::text) LOOP
if _def_value.defvalue is not null then
_new := _new || _def_value.defvalue;
end if;
......
......@@ -63,7 +63,7 @@ begin
for _def_value in EXECUTE FORMAT ('SELECT * FROM %1$I.default_value
where (tablename=%2$L or tablename=''_all'')
and (%3$L::jsonb @> objectdef::jsonb or objectdef is null);'
,(parse_ident(i_regclass::text))[1], (parse_ident(i_regclass::text))[2], _new::text) LOOP
,TG_TABLE_SCHEMA, _table, _new::text) LOOP
if _def_value.defvalue is not null then
_new := _new || _def_value.defvalue;
end if;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment