pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Hafstaư <gnari@simnet.is>
To: Moran.Michael <Michael.Moran@IGT.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to cast VARCHAR to BYTEA and vice-versa?
Date: Mon, 14 Mar 2005 08:46:33 +0000
Message-ID: <1110789993.12425.16.camel@localhost.localdomain> (raw)
In-Reply-To: <B27C8914860EE24E865D189A3735EA5310091D@lasexch03.is.ad.igt.com>
References: <B27C8914860EE24E865D189A3735EA5310091D@lasexch03.is.ad.igt.com>

On Tue, 2005-03-08 at 07:31 -0800, Moran.Michael wrote:
> Hello all,
>  
> I have a table with a VARCHAR column that I need to convert to a BYTEA.
>  
> How do I cast VARCHAR to BYTEA?

have you looked at the encode() and decode() functions ?
http://www.postgresql.org/docs/7.4/interactive/functions-string.html

gnari





view thread (5+ messages)  latest in thread

Message-ID: <1110789993.12425.16.camel@localhost.localdomain>
Permalink:  ../1110789993.12425.16.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1110789993.12425.16.camel@localhost.localdomain

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gnari@simnet.is, Michael.Moran@IGT.com
  Subject: Re: How to cast VARCHAR to BYTEA and vice-versa?
  In-Reply-To: <1110789993.12425.16.camel@localhost.localdomain>

* 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