Boolean casting in 7.3 -> changed?

From: Ian Barwick <barwick(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Boolean casting in 7.3 -> changed?
Date: 2002-11-27 00:19:05
Message-ID: 200211270119.05314.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


A quick question:

in 7.3 the following no longer works:

template1=> select 0::bool;
ERROR: Cannot cast type integer to boolean

The statement must be rewritten as this:

template1=> select '0'::bool;
bool
------
f
(1 row)

Is there a reason for this?
I ask because the former query works in 7.1.3 and 7.2.1,
but I haven't seen any mention of a change in 7.3 (at
least not in the release notes).

Apologies if this has been discussed to death previously,
but it might be worth mentioning somewhere as a "gotcha".

Ian Barwick
barwick(at)gmx(dot)net

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-11-27 00:57:18 Re: Request from eWeek for 7.3 comments
Previous Message Fernando Nasser 2002-11-26 23:57:22 Re: error codes