RE: Storing images in PG?

From: "Andrew Snow" <andrew(at)modulus(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: RE: Storing images in PG?
Date: 2001-08-16 16:08:14
Message-ID: 000601c1266d$a751c810$fa01b5ca@avon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I have found (and confirmed by studying the PostgreSQL
> source) that to reliably insert arbitrary binary data into a
> bytea column there are only 3 characters which need to be
> escaped: \000, \047 ( ' ), \134 ( \ ). Here's the PHP
> function that I've been using:

Postgresl, in treating things as strings, handles \000 as NULL as an end
of string.

select 'abc\000def' as hehehe;
hehehe
--------
abc
(1 row)

How do you get the data back from a query, with all the nulls in it?

- Andrew

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2001-08-16 16:25:55 Re: Storing images in PG?
Previous Message Ben-Nes Michael 2001-08-16 16:06:44 Re: Roll Back dont roll back counters