Skip to content

Commit f15eeff

Browse files
author
Thomas G. Lockhart
committed
Modify to reflect changes in boolean input behavior (rejects bad input
rather than assuming FALSE).
1 parent ac357fb commit f15eeff

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/test/regress/expected/boolean.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ QUERY: CREATE TABLE BOOLTBL2 (f1 bool);
9898
QUERY: INSERT INTO BOOLTBL2 (f1) VALUES ('f'::bool);
9999
QUERY: INSERT INTO BOOLTBL2 (f1) VALUES ('false'::bool);
100100
QUERY: INSERT INTO BOOLTBL2 (f1) VALUES ('False'::bool);
101+
QUERY: INSERT INTO BOOLTBL2 (f1) VALUES ('FALSE'::bool);
101102
QUERY: INSERT INTO BOOLTBL2 (f1)
102103
VALUES ('XXX'::bool);
104+
WARN:Invalid input string 'XXX'
105+
103106
QUERY: SELECT '' AS f_4, BOOLTBL2.*;
104107
f_4|f1
105108
---+--

src/test/regress/sql/boolean.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--
22
-- boolean.source
33
--
4-
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.3 1997/05/09 03:26:43 scrappy Exp $
4+
-- $Header: /cvsroot/pgsql/src/test/regress/sql/boolean.sql,v 1.4 1997/10/25 06:02:33 thomas Exp $
55
--
66

77
--
@@ -70,7 +70,10 @@ INSERT INTO BOOLTBL2 (f1) VALUES ('false'::bool);
7070

7171
INSERT INTO BOOLTBL2 (f1) VALUES ('False'::bool);
7272

73-
-- this evaluates to a false value
73+
INSERT INTO BOOLTBL2 (f1) VALUES ('FALSE'::bool);
74+
75+
-- this is now an invalid expression
76+
-- pre-v6.3 this evaluated to false - thomas 1997-10-23
7477
INSERT INTO BOOLTBL2 (f1)
7578
VALUES ('XXX'::bool);
7679

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy