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 results when using system information functions #16026
Consider the test case below. It is unexpected that the last query returns -1, because the result of the second query is NULL, which means that the WHERE clause in the last query should be evaluated to NULL and thus the row should be filtered.
I also observed similar issues in CURRENT_SETTING and PG_GET_FUNCTION_RESULT
Steps to Reproduce
DROPTABLE IF EXISTS t0;
CREATETABLEt0(c1 INTEGER);
INSERT INTO t0(c1) VALUES (-1);
REFRESH TABLE t0;
SELECT*FROM t0; -- -1SELECT (NOT ((PG_ENCODING_TO_CHAR(t0.c1))<(false))) FROM t0; -- NULLSELECT*FROM t0 WHERE (NOT ((PG_ENCODING_TO_CHAR(t0.c1))<(false)));
-- Expected: empty table-- Actual: -1
Activity
jeeminso commentedon May 28, 2024
Thanks for reporting @suyZhong! The fix will be available in
5.7.2.