You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected result when using PG_GET_PARTKEYDEF #16172
The query using PG_GET_PARTKEYDEF and applying the NOT operator should result in a NULL value. Consequently, the WHERE clause should filter out all rows, resulting in an empty result set. However, the actual result set includes the row with the value 1, which indicates misbehavior.
Steps to Reproduce
DROPTABLE IF EXISTS t0;
CREATETABLEt0 (c0 INTEGER) ;
INSERT INTO t0(c0) VALUES (1);
REFRESH TABLE t0;
SELECT*FROM t0; -- 1SELECT (NOT (PG_GET_PARTKEYDEF(t0.c0))) FROM t0; -- NULLSELECT*FROM t0 WHERE (NOT (PG_GET_PARTKEYDEF(t0.c0)));
-- Expected: empty table-- Actual: 1
Activity
Fix `pg_get_partkeydef` incorrectly marked as NON_NULLABLE
Fix `pg_get_partkeydef` incorrectly marked as NON_NULLABLE
Fix `pg_get_partkeydef` incorrectly marked as NON_NULLABLE
matriv commentedon Jun 17, 2024
Thx a lot for spotting and reporting this @suyZhong, the fix will be available with the next hotfix release.
Fix `pg_get_partkeydef` incorrectly marked as NON_NULLABLE
Fix `pg_get_partkeydef` incorrectly marked as NON_NULLABLE