Boolean without default declared - Mailing list pgsql-sql

From Jon Collette
Subject Boolean without default declared
Date
Msg-id 46C349EA.5050201@etelos.com
Whole thread Raw
Responses Re: Boolean without default declared  (Richard Broersma Jr <rabroersma@yahoo.com>)
List pgsql-sql
If a column with a boolean datatype doesn't have a default value.  What 
type of value is set if nothing is inserted into that column?  Here is 
my test table and the queries I have tried.  I can't seem to be able to 
select the rows where happy has no value.
           Table "public.users"Column |         Type          | Modifiers
--------+-----------------------+-----------id     | character varying(32) |email  | text                  |happy  |
boolean              |money  | numeric               |
 


*select * from users;                *id | email  | happy |  money 
----+--------+-------+---------4  | me     |       | 1324.234  | me     |       | 1324.233  | as     |       |   123.21
| afjssd | t     |       
 

*select * from users where happy;*id | email  | happy | money
----+--------+-------+-------1  | afjssd | t     |     

*select * from users where not happy;*id | email | happy | money
----+-------+-------+-------
(0 rows)

*select * from users where happy = NULL;*id | email | happy | money
----+-------+-------+-------
(0 rows)

*select * from users where happy = '';*
ERROR:  invalid input syntax for type boolean: ""



pgsql-sql by date:

Previous
From: "Jon Horsman"
Date:
Subject: Re: When is a shared library unloaded?
Next
From: Richard Broersma Jr
Date:
Subject: Re: Boolean without default declared