RE: Re: Data type for storing images? - Mailing list pgsql-general

From Franck Martin
Subject RE: Re: Data type for storing images?
Date
Msg-id F12ECEA0435AD211B5280008C7ACBC857FF3D6@BIGIRON
Whole thread Raw
In response to Data type for storing images?  (<drevil@sidereal.kz>)
List 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@sopac.org <mailto:franck@sopac.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@sss.pgh.pa.us]
Sent: Wednesday, 14 March 2001 6:26
To: Gordan Bobic
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Re: Data type for storing images?


"Gordan Bobic" <gordan@freeuk.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

pgsql-general by date:

Previous
From: Barry Stinson
Date:
Subject: SELECT and Arrays
Next
From: Michael Ansley
Date:
Subject: RE: SELECT and Arrays