From: TJ O'Donnell <tjo@acm.org>
To: howardnews@selestial.com
Cc: pgsql-general@postgresql.org
Subject: Re: Converting Text to Bytea
Date: Wed, 01 Feb 2006 08:22:58 -0800
Message-ID: <43E0E062.2040301@acm.org> (raw)
In-Reply-To: <20060201141737.CDB1F512414@mx2.hub.org>
References: <20060201141737.CDB1F512414@mx2.hub.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tjo@acm.org, howardnews@selestial.com
Subject: Re: Converting Text to Bytea
In-Reply-To: <43E0E062.2040301@acm.org>
References: <20060201141737.CDB1F512414@mx2.hub.org> <43E0E062.2040301@acm.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox