Re: Re: binary data - Mailing list pgsql-sql

From Alex Pilosov
Subject Re: Re: binary data
Date
Msg-id Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: binary data  (hughmandeville@hotmail.com (Hugh Mandeville))
List pgsql-sql
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
> 
> 



pgsql-sql by date:

Previous
From: mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström)
Date:
Subject: How to check if a table exists from functions.
Next
From: Rene Pijlman
Date:
Subject: Re: not null - trivial, unexpected behavior