List:General Discussion« Previous MessageNext Message »
From:Ray Date:March 3 2004 6:40pm
Subject:Re: PgSQL vs MySQL
View as plain text  
from the manual it appears that "char(0) null default null" can be 
used as a boolean, will the values of either null or "".  haven't 
tried it myself, but its documented.

http://www.mysql.com/documentation/mysql/bychapter/manual_Column_types.html#Column_types
[NATIONAL] CHAR(M) [BINARY | ASCII | UNICODE] 
This is also quite nice when you need a column that only can 
take 2 values: A CHAR(0), that is not defined as NOT NULL, will only 
occupy one bit and can only take 2 values: NULL or "". See section 
6.2.3.1 The CHAR and VARCHAR Types. 

On Wednesday 03 March 2004 11:43, Curtis Maurand wrote:
> :-)
>
> someflag enum('TRUE','FALSE');
>
> Not quite boolean, but it works.
>
> Curtis
>
> On Wed, 3 Mar 2004, Mark Warner wrote:
> > The thing which bothers me most about MySQL is the lack of a
> > proper boolean. I don't like having to abstract a tinyint(1) into
> > true or false. As much of my work involves building applications
> > with Yes or No questions, I think I am switching to PostgreSQL.
> >
> > david.best@stripped wrote:
> > >>What advantages, besides ease of setup, does MySQL hold over
> > >> PostgreSQL? It would seem, to me, that the two are close
> > >> competitors (both in quality, and performance).
> > >
> > >Are you sure about quality?  Check out:
> > >
> > >http://sql-info.de/mysql/gotchas.html
> > >
> > >You can check out postgresql's on the same site but they are
> > > significally less critical.   After reviewing this and talking
> > > to some other people i'm switching over to postgresql.   I'm
> > > sure there is a place with mysql but I don't think i'd trust it
> > > for anything critical unless you very confident your developers
> > > know what they are doing.
Thread
PgSQL vs MySQLMark Warner3 Mar
Re: PgSQL vs MySQLdavid.best3 Mar
  • Re: PgSQL vs MySQLMark Warner3 Mar
    • Re: PgSQL vs MySQLCurtis Maurand3 Mar
      • Re: PgSQL vs MySQLRay3 Mar
      • Re: PgSQL vs MySQLMichael Stassen3 Mar
        • Re: PgSQL vs MySQLKevin Williams3 Mar
        • Re: PgSQL vs MySQLCurtis Maurand3 Mar
  • Re: PgSQL vs MySQLDavid Griffiths3 Mar
    • RE: PgSQL vs MySQLJames Kelty3 Mar
    • RE: PgSQL vs MySQLJeremy Smith3 Mar
      • Re: PgSQL vs MySQLKaarel13 Mar
  • Re: PgSQL vs MySQLKaren Abgarian3 Mar
  • Re: PgSQL vs MySQLDavid Griffiths3 Mar
    • Re: PgSQL vs MySQLMark Warner3 Mar
Re: PgSQL vs MySQLEric @ Zomething3 Mar
  • Re: PgSQL vs MySQLMartijn Tonies3 Mar
Re: PgSQL vs MySQLDavid Griffiths3 Mar
Re: PgSQL vs MySQLJeremy Zawodny3 Mar