Re: ERROR: cannot cast type text to bit varying

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 23:00:41
Message-ID: 1118358041.3596.54.camel@dbamm01-linux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > 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')), 123::oid, 32);
> varbit_in
> -----------
> 1101
> (1 fila)

Ah... This is more like it. Thank you.

I'll explore this more tomorrow. Are "varbit_in" and "textout"
documented?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Otto Blomqvist 2005-06-10 01:10:28 Setting all elements in an Bool[] array to the same value
Previous Message Alvaro Herrera 2005-06-09 22:54:06 Re: ERROR: cannot cast type text to bit varying