Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5f19412

Browse files
committed
Add tests for int4_bool() in int.c
This cast was previously not covered at all by the regression tests.Author: Christoph BergDiscussion:https://postgr.es/m/ZYQZ1hNfLd_4rzkn@msg.df7cb.de
1 parentb588cad commit5f19412

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

‎src/test/regress/expected/boolean.out

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,25 @@ SELECT isnul OR istrue OR isfalse FROM booltbl4;
566566
t
567567
(1 row)
568568

569+
-- Casts
570+
SELECT 0::boolean;
571+
bool
572+
------
573+
f
574+
(1 row)
575+
576+
SELECT 1::boolean;
577+
bool
578+
------
579+
t
580+
(1 row)
581+
582+
SELECT 2::boolean;
583+
bool
584+
------
585+
t
586+
(1 row)
587+
569588
--
570589
-- Clean up
571590
-- Many tables are retained by the regression test, but these do not seem

‎src/test/regress/sql/boolean.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ SELECT isfalse OR isnul OR istrue FROM booltbl4;
250250
SELECT istrueOR isfalseOR isnulFROM booltbl4;
251251
SELECT isnulOR istrueOR isfalseFROM booltbl4;
252252

253+
-- Casts
254+
SELECT0::boolean;
255+
SELECT1::boolean;
256+
SELECT2::boolean;
257+
253258

254259
--
255260
-- Clean up

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp