On 13 Sep 2001 22:58:23 -0500, you wrote:
>I have a schema & data from Oracle that uses a 'fake' boolean column.
>(Stupid oracle doesn't support type boolean afaik - uses number). I
>find the easiest way to adapt the schema & data to postgresql is to
>*not* convert the 'fake' boolean fields (enforced in Oracle using
>constraints) to postgresql boolean but to use either numeric(1) or
>So - the submitted patch allows a boolean field to be implemented using
>either numeric or integer fields - I think this is pretty common.
Ah, I see.
Well, for what its worth, this is allowed by the JDBC spec. The
getXXX()/datatypes mapping table at the end of the JDBC book
says mapping getBoolean() to SQL BIT is recommended, but calling
it on TINYINT, SMALLINT, INTEGER, BIGINT, REAL, FLOAT, DOUBLE,
DECIMAL, NUMERIC, CHAR, VARCHAR, LONGVARCHAR is also allowed.
In fact, I think this means our driver is required to support
The book doesn't say how the values in these types should map to
true and false though.
I guess this means there is no objection to the patch. But
personally, I would prefer to do it right the first time for all
datatypes, rather than extending the if statement for every
René Pijlman <[EMAIL PROTECTED]>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])