minor problem in boolean cast

From: Cary Huang <cary(dot)huang(at)highgo(dot)ca>
To: "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: minor problem in boolean cast
Date: 2020-10-23 23:56:58
Message-ID: 17557e4dd97.fa5aae1a161459.7726916839177387693@highgo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I noticed that when casting a string to boolean value with input 'of' it still cast it to 'f'. I think with 'of', it should give an error because 'off' is the expected candidate. This may not be intended so I made a simple patch to address this. 

```

postgres=# select cast('of' as boolean);

bool

------

f

(1 row)

```

Cary Huang

-------------

HighGo Software Inc. (Canada)

mailto:cary(dot)huang(at)highgo(dot)ca

http://www.highgo.ca

Attachment Content-Type Size
0001-boolean-type-cast-fix.patch application/octet-stream 492 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-10-24 00:02:52 Re: speed up unicode decomposition and recomposition
Previous Message Mark Dilger 2020-10-23 23:22:22 Re: new heapcheck contrib module