pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alex Pilosov <alex@pilosoft.com>
To: Hugh Mandeville <hughmandeville@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Re: binary data
Date: Wed, 20 Jun 2001 13:43:37 -0400 (EDT)
Message-ID: <Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com> (raw)
In-Reply-To: <ae21865c.0106131524.607c80c2@posting.google.com>

Yes, there is a binary datatype, called 'bytea', which can handle anything
you can throw at it, including nulls.

The rules for escaping things you want to throw at it are tricky though.
(and same for unescaping things you get back from database).

If you are using perl, use DBD::Pg version 1.00 or higher, it encapsulates
it all transparently.

On 13 Jun 2001, Hugh Mandeville wrote:

> > Is there any method to insert binary data in a PostgreSQL row?
> 
> i'm curious too.
> 
> Chapter 3. of the PostgreSQL 7.1 User's Guide has a description of the
> data types.
> 
> http://www.postgresql.org/idocs/index.php?datatype.html
> 
> i couldn't find any official binary data type listed.  you might try
> using the text data type and uuencode the data on the way in and
> uudecode it on the way out.
> 
> the doc note section does mention the "bytea" data type, which works,
> but i don't know if it is supported or its limitations.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
> 




view thread (12+ messages)  latest in thread

Message-ID: <Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com>
Permalink:  ../Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com/
Also on:    postgresql.org/message-id/Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com

 · 

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 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-sql@postgresql.org
  Cc: alex@pilosoft.com, hughmandeville@hotmail.com
  Subject: Re: binary data
  In-Reply-To: <Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com>
  References: <ae21865c.0106131524.607c80c2@posting.google.com> <Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com>

* 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