Re: ERROR: cannot cast type text to bit varying

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Matt Miller
Дата:
Сообщение: ERROR: cannot cast type text to bit varying
Следующее
От: Peter Fein
Дата:
Сообщение: Version Control?