Re: Bit string help, please

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Bit string help, please
Дата
Msg-id 47D03987.9000307@archonet.com
обсуждение исходный текст
Ответ на Re: Bit string help, please  (tyrrill_ed@emc.com)
Ответы Re: Bit string help, please
Список pgsql-sql
tyrrill_ed@emc.com wrote:
> I tried this real quick at the psql command prompt, and unfortunately it
> doesn't work:
> 
> mydb=# select ('1' || repeat('0',7))::bit varying;
> ERROR:  cannot cast type text to bit varying
> 
> I appreciate the try though.  Any other ideas?  I am using PostgreSQL
> 8.2.3.1.  I don't know if that matters too much.

Ah, sorry - that was an 8.3-only cast.

I think your only real option will be to build your query as a string 
and use EXECUTE to get the bit-varying you want in your function.

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: tyrrill_ed@emc.com
Дата:
Сообщение: Re: Bit string help, please
Следующее
От: tyrrill_ed@emc.com
Дата:
Сообщение: Re: Bit string help, please