db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. Hillyerd" <ja...@whynotown.com>
Subject Re: Postgres aapter bug
Date Mon, 28 Apr 2003 18:58:45 GMT
On Fri, 2003-04-25 at 15:48, Thomas Fogwill wrote:
> *snip*
> The best way to fix this, I think, is to realise that the adapter can
> never return the correct string for all 3 types, and to accordingly fix
> things on the sql generation side. i.e. Regardless of whether the schema
> says BIT, BOOLEANCHAR or BOOLEANINT, always generate boolean columns as
> int2. Then the adapter will work for each of the 3 boolean types.

A couple thoughts here:

One of Torque's strengths is that it can work with already existing
database schemas.  If we limit Torque to only support type "X" for
boolean values, people who chose a different type for boolean values
would not be able to use Torque without redesigning their schema.  Not
everyone is going to be using only torque to interface to their
database... they might be migrating from PHP to Java, etc.

Even if we chose to limit Torque to one boolean type, I think it ought
to respect the standard practices for each database for storing boolean
types.  Or at the least, pick the most specific type for each database:

1. boolean
2. bit
3. int2
4. integer



James A. Hillyerd <james@whynotown.com>
WhyNotOwn.com - http://www.whynotown.com/

View raw message