Re: [Postfixadmin-devel] Boolean values
Brought to you by:
christian_boltz,
gingerdog
From: Geoff S. <ge...@Qu...> - 2009-08-21 11:17:14
|
On Fri, 21 Aug 2009, David Goodwin wrote: > The main problem is that MySQL has 0 or 1 for boolean values (i.e. I > think the schema uses a tinyint field, rather than boolean); whereas > PostgreSQL uses boolean. This is true and affects how one would retrieve stored data. However my suggestion related to building queries, and both mysql and postgresql support TRUE and FALSE as constants. It appears that these are the only boolean representations in queries that they have in common, all of PG's other alternatives are strings ('t', 'true', 'y', 'yes', 'on', '1'). Mysql obviously expects an integer, and TRUE and FALSe are simply constants that equal 1 and 0 respectively. This is all spelled out in the documentation for both databases which I provided links for in my previous message. > Christian did suggest that perhaps we move PostgreSQL to use 0/1, but I > didn't think this was a good idea. Given that the mysql documentation says that they'll eventually implement a proper boolean type, you might want to stick with it the way it is for now. > I /think/ I've fixed functions.inc.php for you - but I suspect it > [Postfixadmin] will be broken elsewhere. Am happy to report anything else we find. > There is a problem with PHP/PostgreSQL date handling at the moment too - > I've not sat down to fix this yet, but you will find problems with the > last modified columns etc. I'm new to pg, having previously used mysql only, and am also new to postfixadmin. But I'm happy to help out and will contribute wherever possible. Still, at least odd last-modified dates shouldn't stop PA form working. Thanks for the quick fix, Geoff. |