Re: Needed function IF(expr, expr, expr)

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>, Marek Lewczuk <newsy(at)lewczuk(dot)com>
Cc: Lista dyskusyjna pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Needed function IF(expr, expr, expr)
Date: 2003-09-06 16:32:24
Message-ID: 20030906163224.1183.qmail@web20809.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

--- Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> Marek Lewczuk writes:


> Also note that in PostgreSQL there is a boolean
> type, and 0 and 1 are not
> valid boolean values.
>

Sort of:

jeff=# select 1 = true;
ERROR: Unable to identify an operator '=' for types
'integer' and 'boolean'
You will have to retype this query using an
explicit cast
jeff=# select '1' = true;
?column?
----------
t
(1 row)

jeff=# select version();
version

---------------------------------------------------------------------
PostgreSQL 7.3.1 on i386-portbld-freebsd4.7, compiled
by GCC 2.95.4
(1 row)

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-09-06 16:47:07 Re: Needed function IF(expr, expr, expr)
Previous Message Bruno Wolff III 2003-09-06 15:43:38 Re: Needed function IF(expr, expr, expr)

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-06 16:47:07 Re: Needed function IF(expr, expr, expr)
Previous Message Bruno Wolff III 2003-09-06 15:43:38 Re: Needed function IF(expr, expr, expr)