Re: How to cast VARCHAR to BYTEA and vice-versa?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Moran(dot)Michael" <Michael(dot)Moran(at)IGT(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to cast VARCHAR to BYTEA and vice-versa?
Date: 2005-03-09 01:10:30
Message-ID: 422E4D06.1010902@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>How do I cast VARCHAR to BYTEA?
>
>
> I think it would work to create a cast WITHOUT FUNCTION, assuming that
> the semantics you want is that the exact bytes in the varchar datum
> become the bytes in the bytea (no encoding or backslashing conversions).

Are pg_escape_bytea and pg_unescape_bytea available from the backend as
well as libpq?

Chris

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-03-09 03:52:09 Re: Where to see the patch queue (was Re: [PATCHES] Patch
Previous Message Alvaro Herrera 2005-03-09 00:33:23 Re: How to cast VARCHAR to BYTEA and vice-versa?