From: aditsu <aditsu@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Why is bool == java.sql.Types.BIT ??
Date: Tue, 24 May 2011 04:05:43 -0700 (PDT)
Message-ID: <1306235143484-4421744.post@n5.nabble.com> (raw)
In-Reply-To: <BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com>
References: <dm29na$nrg$1@sea.gmane.org>
<Pine.BSO.4.61.0511231340310.14387@leary.csoft.net>
<1306228847962-4421529.post@n5.nabble.com>
<BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com>
Oliver Jowett wrote:
>
> Can you explain what (in your application) you would do differently
> for a column that returned Types.BOOLEAN versus a column that returned
> Types.BIT?
>
It has to do with analyzing/comparing table structures, copying tables on
another server (especially when it uses a different DBMS), and generally
handling column types automatically in various situations.
If it returns BIT for a boolean column, then I have to add some special
handling when using postgres to check for the type name and adjust
accordingly.
In the particular application where I found the problem, I was doing a
"diff" between 2 table structures, and it was generating something like
"ALTER TABLE request ADD COLUMN active bit" where "active" was supposed to
be boolean. While both types seem to use Boolean on the java side, they are
not compatible in postgres.
Adrian
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Why-is-bool-java-sql-Types-BIT-tp2169629p4421744.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: aditsu@yahoo.com
Subject: Re: Why is bool == java.sql.Types.BIT ??
In-Reply-To: <1306235143484-4421744.post@n5.nabble.com>
References: <dm29na$nrg$1@sea.gmane.org> <Pine.BSO.4.61.0511231340310.14387@leary.csoft.net> <1306228847962-4421529.post@n5.nabble.com> <BANLkTikqk9uh_3gXc4D-FHuS=+-BFTsErw@mail.gmail.com> <1306235143484-4421744.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox