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 Tue, 29 Apr 2003 18:03:43 GMT
Hi Matt,

I like your idea.  Seems like postgres will let you select against all
three of those column types with a '0' or '1', I was expecting it to
barf on the int2.

I think we may run into problems with inserts though, since Torque uses
'Y' and 'N' for booleanchar values.

-james

On Mon, 2003-04-28 at 19:35, Matt Finn wrote:
> Hi,
> 
> I have also been afflicted with that problem.
> How about using single quotes for booleans ('0' and '1')? This works 
> fine with 7.2 and 7.3 postgres across all three types, although I 
> haven't tested any earlier versions.
> 
> postgres=# create table test (one boolean, two char, three int2);
> CREATE TABLE
> postgres=# insert into test (one,two,three) values ('0','0','0');
> INSERT 43810 1
> postgres=# insert into test (one,two,three) values ('1','1','1');
> INSERT 43811 1
> postgres=# select * from test;
>   one | two | three
> -----+-----+-------
>     0 | f   | 0
>     1 | t   | 1
> (2 rows)
> 
> postgres=#
> 
> 
> -matt
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
-- 
James A. Hillyerd <james@whynotown.com>
WhyNotOwn.com - http://www.whynotown.com/


Mime
View raw message