Re: Converting Text to Bytea

Поиск
Список
Период
Сортировка
От TJ O'Donnell
Тема Re: Converting Text to Bytea
Дата
Msg-id 43E0E062.2040301@acm.org
обсуждение исходный текст
Ответ на Converting Text to Bytea  (Howard Cole <howardnews@selestial.com>)
Список pgsql-general
decode(your_string,'escape') will convert text to bytea
You can just use this as a sort of type cast, or:
1. Create a new bytea column in your table
2. Update the table, setting the newcolumn = decode(oldcolumn,'escape')
3. Drop the oldcolumn (or not)

TJ


Date: Wed, 01 Feb 2006 10:04:36 +0000
From: Howard Cole <howardnews@selestial.com>
To: 'PgSql General' <pgsql-general@postgresql.org>
Subject: Converting Text to Bytea
Message-ID: <43E087B4.4040601@selestial.com>

Hi,

Can anyone tell me how to convert a text column to a bytea column?

Thanks.

Howard Cole
www.selestial.com

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: 8.0.3 regexp_replace()...
Следующее
От: MargaretGillon@chromalloy.com
Дата:
Сообщение: Concatenated VARCHAR becomes TEXT in view