| From: | "Lehmeier, Michael" <michael(dot)lehmeier(at)cognitech(dot)de> |
|---|---|
| To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Format of BOOLEAN |
| Date: | 2001-06-07 16:05:47 |
| Message-ID: | 2BC8FB121C58D4118D5100D0B72016BA8394@tznks01.ct.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello
When I SELECT a row with a BOOLEAN in it I get either 't' or 'f'.
But when I use this same value in the WHERE condition I get an error,
because PostgreSQL demands either 'true' or 'false'.
Example:
testdb=# create table testtable (acolumn BOOLEAN);
CREATE
testdb=# INSERT INTO testtable VALUES (true);
INSERT 161246 1
testdb=# SELECT * FROM testtable;
acolumn
---------
t
(1 row)
testdb=# SELECT * FROM testtable WHERE acolumn = t;
ERROR: Attribute 't' not found
This is a real problem for me since I am currently writing on a mostly
database independent engine. PostgreSQL would be the the first time that
I can't write into a database what I read from it.
Is it possible to change the settings of PostgreSQL somewhere so that
I get 'true' or 'false'?
Thank you!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | zilch | 2001-06-07 16:38:44 | WAS: PostgreSQL Replication Server? IS: Zend comparison chart |
| Previous Message | zilch | 2001-06-07 15:51:55 | inserting, index and no index - speed |