PG-1313 Fix decode_error_level SQL function (#539)

Update decode_error_level funcion to support error codes up to PG
version 17.
This commit is contained in:
Artem Gavrilov
2025-06-19 15:38:44 +02:00
committed by GitHub
parent 61662cc58f
commit 76b0802142
5 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
CREATE EXTENSION pg_stat_monitor;
DO $$
DECLARE
i integer;
BEGIN
FOR i IN 10..24 LOOP
RAISE NOTICE 'error_code: %, error_level: %', i, decode_error_level(i);
END LOOP;
END $$;
DROP EXTENSION pg_stat_monitor;