Re: Casting integer to boolean - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject Re: Casting integer to boolean
Date
Msg-id GNELIHDDFBOCMGBFGEFOEELOCDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Casting integer to boolean  (Tod McQuillin <devin@spamcop.net>)
List 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



pgsql-sql by date:

Previous
From: Tod McQuillin
Date:
Subject: Re: Casting integer to boolean
Next
From: Gary Stainburn
Date:
Subject: references definition to multi-field primary key