From: | Matt Miller <mattm(at)epx(dot)com> |
---|---|
To: | PostgreSQL - GENERAL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: ERROR: cannot cast type text to bit varying |
Date: | 2005-06-09 20:16:42 |
Message-ID: | 1118348202.3596.37.camel@dbamm01-linux |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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?
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Fein | 2005-06-09 20:25:14 | Version Control? |
Previous Message | Matt Miller | 2005-06-09 20:05:02 | ERROR: cannot cast type text to bit varying |