From 479e12f1b3ae08cd67bd547def54bdde21998cae Mon Sep 17 00:00:00 2001 From: Xiangjin Date: Fri, 31 Mar 2023 17:34:02 +0800 Subject: [PATCH] avoid random --- src/tests/regress/data/expected/case.out | 2 +- src/tests/regress/data/sql/case.sql | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tests/regress/data/expected/case.out b/src/tests/regress/data/expected/case.out index f5136c17abbf..79414290e560 100644 --- a/src/tests/regress/data/expected/case.out +++ b/src/tests/regress/data/expected/case.out @@ -73,7 +73,7 @@ SELECT '6' AS "One", (1 row) SELECT '7' AS "None", - CASE WHEN random() < 0 THEN 1 + CASE WHEN 1 < 0 THEN 1 END AS "NULL on no matches"; None | NULL on no matches ------+-------------------- diff --git a/src/tests/regress/data/sql/case.sql b/src/tests/regress/data/sql/case.sql index 5c24f5c478a7..18c81a7a14f1 100644 --- a/src/tests/regress/data/sql/case.sql +++ b/src/tests/regress/data/sql/case.sql @@ -59,9 +59,9 @@ SELECT '6' AS "One", END AS "Two WHEN with default"; ---@ SELECT '7' AS "None", ---@ CASE WHEN random() < 0 THEN 1 ---@ END AS "NULL on no matches"; +SELECT '7' AS "None", + CASE WHEN 1 < 0 THEN 1 + END AS "NULL on no matches"; -- Constant-expression folding shouldn't evaluate unreachable subexpressions SELECT CASE WHEN 1=0 THEN 1/0 WHEN 1=1 THEN 1 ELSE 2/0 END;