Re: Booleans - Why in Postgres and not in Oracle or Mysql? - Mailing list pgsql-general

From Dann Corbit
Subject Re: Booleans - Why in Postgres and not in Oracle or Mysql?
Date
Msg-id D425483C2C5C9F49B5B7A41F89441547055B58@postal.corporate.connx.com
Whole thread Raw
In response to Booleans - Why in Postgres and not in Oracle or Mysql?  (CSN <cool_screen_name90001@yahoo.com>)
List pgsql-general
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@postgresql.org] On Behalf Of CSN
> Sent: Thursday, May 05, 2005 11:57 AM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Booleans - Why in Postgres and not in Oracle or
Mysql?
>
> I like Postgres's boolean type -

Me too.

> why do you suppose
> neither Mysql nor Oracle has bothered to implement it?

Probably they just create a domain using a char which can take on two
values (e.g. 't'/'f' or 1/0).  Oracle 10 has a bit data type (which is a
boolean for all intents and purposes):
B.1 BIGINT
B.2 BINARY
B.3 BIT
B.4 BLOB
B.5 CHAR
B.6 CLOB
B.7 DATE
B.8 DECIMAL
B.9 DOUBLE PRECISION
B.10 FLOAT
B.11 INTEGER
B.12 LONG
B.13 LONG RAW
B.14 LONG VARBINARY
B.15 LONG VARCHAR
B.16 NUMBER
B.17 NUMERIC
B.18 RAW
B.19 REAL
B.20 ROWID
B.21 SMALLINT
B.22 TIME
B.23 TIMESTAMP
B.24 TINYINT
B.25 VARBINARY
B.26 VARCHAR
B.27 VARCHAR2

MySql has a partial Boolean implementation.  From
http://dev.mysql.com/doc/mysql/en/numeric-type-overview.html:

BOOL , BOOLEAN

These are synonyms for TINYINT(1). The BOOLEAN synonym was added in
MySQL 4.1.0. A value of zero is considered false. Non-zero values are
considered true.

In the future, full boolean type handling will be introduced in
accordance with standard SQL.




> Booleans are in the SQL-99 spec.

Probably, MySQL and Oracle will have Boolean types eventually with full
compatibility to the standard.

> CSN
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
your
>       joining column's datatypes do not match

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Postgres vs Firebird?
Next
From: CSN
Date:
Subject: Re: Booleans - Why in Postgres and not in Oracle or Mysql?