Re: Function to convert from TEXT to BYTEA?

From: TJ O'Donnell <tjo(at)acm(dot)org>
To: dante(at)lorenso(dot)com, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function to convert from TEXT to BYTEA?
Date: 2007-12-12 18:14:10
Message-ID: 476024F2.1070907@acm.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think decode('your string', 'escape') might be what you need.
It returns bytea when 'your string' is type text or varchar.

TJ
http://www.gnova.com

> Is there a function that will do what I want to convert the datatype
> without having to create a CAST that PostgreSQL doesn't have natively?
> How else are you supposed to use the ENCRYPT and DECRYPT functions?

Browse pgsql-general by date

  From Date Subject
Next Message Samantha Atkins 2007-12-12 18:16:15 Re: what is the date format in binary query results
Previous Message Jeff Trout 2007-12-12 18:13:35 Re: Slow PITR restore