BUG: IS NOT NULL on RECORD variable fails in 17.5-dev
От | Peter Praxmarer |
---|---|
Тема | BUG: IS NOT NULL on RECORD variable fails in 17.5-dev |
Дата | |
Msg-id | CABBx1iF9pQfB3pOP9EBBHe0uyQo2oPRR-iWv0d_OOB-vn3rD+A@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: BUG: IS NOT NULL on RECORD variable fails in 17.5-dev
Re: BUG: IS NOT NULL on RECORD variable fails in 17.5-dev |
Список | pgsql-bugs |
Hello,
I have discovered what appears to be a severe bug in a development version of PostgreSQL 17 where a populated RECORD variable incorrectly fails an IS NOT NULL check.
Version Information:
PostgreSQL 17.5 (Debian 17.5-1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
PostgreSQL 17.5 (Debian 17.5-1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
Minimal Reproducible Example:
DO $$
DECLARE
r RECORD;
BEGIN
RAISE NOTICE '--- Assigning a row with a NULL column into "r" ---';
SELECT 42 AS id, NULL::text AS name INTO r;
RAISE NOTICE 'The value of r is: %', r;
ASSERT r IS NOT NULL, 'ASSERTION FAILED: r IS NULL!';
RAISE NOTICE 'Assertion Passed.';
END $$;
r RECORD;
BEGIN
RAISE NOTICE '--- Assigning a row with a NULL column into "r" ---';
SELECT 42 AS id, NULL::text AS name INTO r;
RAISE NOTICE 'The value of r is: %', r;
ASSERT r IS NOT NULL, 'ASSERTION FAILED: r IS NULL!';
RAISE NOTICE 'Assertion Passed.';
END $$;
Actual Output:
NOTICE: --- Assigning a row with a NULL column into "r" ---
NOTICE: The value of r is: (42,)
ERROR: ASSERTION FAILED: r IS NULL!
CONTEXT: PL/pgSQL function inline_code_block line 8 at ASSERT
NOTICE: The value of r is: (42,)
ERROR: ASSERTION FAILED: r IS NULL!
CONTEXT: PL/pgSQL function inline_code_block line 8 at ASSERT
Expected Output: The ASSERT should pass without error. The RAISE NOTICE proves the record is populated immediately before the ASSERT fails. Thank you.
В списке pgsql-bugs по дате отправления: