Search Postgresql Archives

Re: Converting Text to Bytea

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
To: 'PgSql General' <pgsql-general@xxxxxxxxxxxxxx>
Subject: Converting Text to Bytea
Message-ID: <43E087B4.4040601@xxxxxxxxxxxxx>

Hi,

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

Thanks.

Howard Cole
www.selestial.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux