From: | Alex Pilosov <alex(at)pilosoft(dot)com> |
---|---|
To: | Hugh Mandeville <hughmandeville(at)hotmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Re: binary data |
Date: | 2001-06-20 17:43:37 |
Message-ID: | Pine.BSO.4.10.10106201342060.20262-100000@spider.pilosoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)postgresql(dot)org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Hunter, Ray | 2001-06-20 18:42:42 | Functions and Triggers |
Previous Message | Frank Bax | 2001-06-20 17:13:00 | Re: Help on a sql querry. |