RE: Re: Data type for storing images?

From: Franck Martin <Franck(at)sopac(dot)org>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gordan Bobic <gordan(at)freeuk(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: RE: Re: Data type for storing images?
Date: 2001-03-13 23:54:11
Message-ID: F12ECEA0435AD211B5280008C7ACBC857FF3D6@BIGIRON
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Would a binary cursor solve the problem or the SELECT BINARY ?

I support the fact that PG as a whole should send the data to the client as
it is stored. It means the system must store the size of the data with its
data and do a memcopy rather than a sprintf... Do not use \0 as a delimiter
of fields...

I haven't yet tried to see if a custom data type can send and store binary
data and be read by pgsql libraries. Now that PG is TOAST it must support
binary data without support functions or encoding.

Cheers.

Franck Martin
Network and Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: franck(at)sopac(dot)org <mailto:franck(at)sopac(dot)org>
Web site: http://www.sopac.org/
<http://www.sopac.org/> Support FMaps: http://fmaps.sourceforge.net/
<http://fmaps.sourceforge.net/>

This e-mail is intended for its addresses only. Do not forward this e-mail
without approval. The views expressed in this e-mail may not be necessarily
the views of SOPAC.

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, 14 March 2001 6:26
To: Gordan Bobic
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Re: Data type for storing images?

"Gordan Bobic" <gordan(at)freeuk(dot)com> writes:
> More to the point, what would be a reason for not using bytea to
> replace BLOBs completely?

The fact that encoding/decoding is a pain in the neck :-(. The
lo_read/lo_write interfaces are a relatively convenient way to send
and receive binary data, but the ASCII input-output representation that
bytea uses is not.

We really need some binary-friendly data transmission interface like
lo_read/lo_write for bytea fields before they will be ready to take over
the world. I think Jan has some ideas about how to do that, but it's
not done yet.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Browse pgsql-general by date

  From Date Subject
Next Message Michael Ansley 2001-03-14 00:05:00 RE: SELECT and Arrays
Previous Message Barry Stinson 2001-03-13 23:08:32 SELECT and Arrays