Skip to content

Commit df1f14a

Browse files
authored
[-] fix updating metric definition in database configuration, fixes #644 (#645)
1 parent 9cdbf7b commit df1f14a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/metrics/postgres_schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BEGIN
3333
ELSIF TG_OP = 'UPDATE' THEN
3434
IF OLD.name <> NEW.name THEN
3535
UPDATE pgwatch.preset
36-
SET pc_config = jsonb_set(metrics - OLD.name::text, ARRAY[NEW.name::text], metrics -> OLD.name)
36+
SET metrics = jsonb_set(metrics - OLD.name::text, ARRAY[NEW.name::text], metrics -> OLD.name)
3737
WHERE metrics ? OLD.name::text;
3838
END IF;
3939
END IF;

0 commit comments

Comments
 (0)