Re: cast bool/int
| От | Achilleas Mantzios |
|---|---|
| Тема | Re: cast bool/int |
| Дата | |
| Msg-id | 200903231018.32126.achill@matrix.gatewaynet.com обсуждение |
| Ответ на | cast bool/int (Zdravko Balorda <zdravko.balorda@siix.com>) |
| Ответы |
Re: cast bool/int
Re: cast bool/int |
| Список | pgsql-sql |
Στις Monday 23 March 2009 09:59:12 ο/η Zdravko Balorda έγραψε: > > Hi, > I need a casting operator from boolean to integer, > tu put in ALTER TABLE statment after USING. > Sorry in the above email i meant smth like CASE WHEN column='t' THEN 1 ELSE 0 END however SELECT 't'::boolean::int; int4 ------ 1 (1 row) and SELECT 'f'::boolean::int;int4 ------ 0 (1 row) work in 8.3 > Any ideas? Thanks. > > Zdravko > > -- Achilleas Mantzios
В списке pgsql-sql по дате отправления: