Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
> > I ended up writing a bunch of code to accomplish what I initially > > thought would be just some casting and bitops on built-in types. > I imagine you could have done something involving textout() and > varbit_in(), like > > alvherre=# select varbit_in(textout(translate('YYNY', 'YN', '10')),

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Alvaro Herrera
On Thu, Jun 09, 2005 at 10:18:27PM +, Matt Miller wrote: > On Thu, 2005-06-09 at 20:05 +, Matt Miller wrote: > > I'm trying to interpret strings of Y's and N's as bit vectors and > > perform bitwise ops on them. > > Well, I ended up writing a bunch of code to accomplish what I initially >

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
On Thu, 2005-06-09 at 20:05 +, Matt Miller wrote: > I'm trying to interpret strings of Y's and N's as bit vectors and > perform bitwise ops on them. Well, I ended up writing a bunch of code to accomplish what I initially thought would be just some casting and bitops on built-in types. I reall

[GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
I'm trying to interpret strings of Y's and N's as bit vectors and perform bitwise ops on them. It's not working: beginning of output= test=# select version (); version

Re: [GENERAL] ERROR: cannot cast type text to bit varying

2005-06-09 Thread Matt Miller
> 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.post