| От | Matt Miller |
|---|---|
| Тема | Re: ERROR: cannot cast type text to bit varying |
| Дата | |
| Msg-id | 1118348202.3596.37.camel@dbamm01-linux обсуждение исходный текст |
| Ответ на | ERROR: cannot cast type text to bit varying (Matt Miller <mattm@epx.com>) |
| Список | pgsql-general |
> It's curious to me that the following is fine: > > ========beginning of output============================= > test=# select '1001'::bit varying; > varbit > -------- > 1001 > (1 row) > ========end of output============================ Okay, I guess I'm not so curious, thanks to http://www.postgresql.org/docs/8.0/static/sql-expressions.html#SQL- SYNTAX-TYPE-CASTS, which tells me: "A cast applied to an unadorned string literal represents the initial assignment of a type to a literal constant value, and so it will succeed for any type" But, I still have my initial problem: > test=# select translate ('YNNY', 'YN', '10')::bit varying & translate > ('NYYN', 'YN', '10')::bit varying; > ERROR: cannot cast type text to bit varying Ideas?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера