Re: Casting integer to boolean

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tod McQuillin" <devin(at)spamcop(dot)net>, "Bhuvan A" <bhuvansql(at)linuxfreemail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Casting integer to boolean
Date: 2002-08-16 07:53:58
Message-ID: GNELIHDDFBOCMGBFGEFOEELOCDAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-sql

> select not count(*) = 0 from my_table;
>
> Basically, for any integer i, convert to boolean with: not i = 0

Or i != 0 of course...

Chris

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-08-16 15:17:08 Re: bug in config for cygwin
Previous Message Tod McQuillin 2002-08-16 07:48:49 Re: Casting integer to boolean

Browse pgsql-sql by date

  From Date Subject
Next Message Gary Stainburn 2002-08-16 15:15:57 references definition to multi-field primary key
Previous Message Tod McQuillin 2002-08-16 07:48:49 Re: Casting integer to boolean