Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 623A2475B84 for ; Thu, 5 Dec 2002 06:04:47 -0500 (EST) Received: from web14504.mail.yahoo.com (web14504.mail.yahoo.com [216.136.224.67]) by postgresql.org (Postfix) with SMTP id C06ED47580B for ; Thu, 5 Dec 2002 06:04:46 -0500 (EST) Message-ID: <20021205110449.97578.qmail@web14504.mail.yahoo.com> Received: from [129.13.135.89] by web14504.mail.yahoo.com via HTTP; Thu, 05 Dec 2002 03:04:49 PST Date: Thu, 5 Dec 2002 03:04:49 -0800 (PST) From: kanika singh Subject: Re: Regarding boolean datatype To: Richard Huxton , pgsql-sql@postgresql.org In-Reply-To: <200212051029.59648.dev@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/67 X-Sequence-Number: 10655 Thanks for the reply. I will definitely look into it. and will come back to you. thanks and regards, Kanika --- Richard Huxton wrote: > On Thursday 05 Dec 2002 9:11 am, kanika singh wrote: > > Hello all, > > > > this is my first interaction with this list. I > have a > > problem. I was using MSSQL Server as db, now i m > > changing to Postgres. I know that the bit type in > > MSSQLserver is boolean in Postgres. > > There's also a bit type if that's really what you > want, but in this case I > think boolean is right. > PS - if you get error messages again, please let us > know what version and > client you are using (e.g. PostgreSQL v7.2.1 from > jdbc) > > > strSql = " Update parts Set name = ? , description > = ? > > world_market = ?, part = ? , unit_of_measure = ? > > Where depot= ?; > > > > prepStmt = conn.prepareStatement(strSql); > > prepStmt.setString( 1, Pname) ; > > prepStmt.setString( 2, Pdesc) ; > > prepStmt.setBoolean(3, BoolWM) ; > [snip] > > SQLError ERROR: Unable to identify an operator > '~~' > > for types 'boolean' and 'unknown' > > You will have to retype this query using an > explicit > > cast > > Are you sure this error goes with this query? I > don't see any use of LIKE here > (which is what ~~ does for you). > > > I know, somewhere i m making mistake, but where?? > > Moreover, if i m updating the database with the > above > > query, the db is giving the error and deleting the > > data from the db. As per my understanding it > should > > automatically rollback. What is the problem??? > > I find this unlikely. If Postgresql was in the habit > of deleting data without > being asked to there'd be mention of it. I suggest > you turn query logging on > (in your postgresql.conf file) while you try to > reproduce this. That will > show you what is really happening. > > > What are the other coding rules for Postgres?? > > Manuals are at http://www.postgresql.org/ > Extra info at http://techdocs.postgresql.org/ > (including some online books) > Mailing lists you know about. > > -- > Richard Huxton > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com