Re: Unanswered questions about Postgre - Mailing list pgsql-general

From Tom Lane
Subject Re: Unanswered questions about Postgre
Date
Msg-id 8746.975607570@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unanswered questions about Postgre  (Joe Kislo <postgre@athenium.com>)
Responses Re: Unanswered questions about Postgre  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Joe Kislo <postgre@athenium.com> writes:
>     Hmm, 1G is probably fine :)   But is there going to be a blob type with
> toast?  If I want to store a large binary object, and have the ability
> of retrieving it strictly over the postgre database connection, would I
> be retrieving a blob column, or a really long varchar column?

If you want binary (8-bit-clean) data, you need to use the 'bytea'
datatype not 'varchar'.  Our character datatypes don't cope with
embedded nulls presently.  This is primarily an issue of the
external representation as a C string.

Alternatively, you can keep using the old-style large-object support
(lo_read, lo_write, etc).  This may be handy if you are dealing with
blobs large enough that you don't want to read or write the entire
value on every access.  We need to add that capability to bytea too,
by defining some access functions that allow reading and writing
portions of a bytea value --- but no one's gotten round to that yet,
so I don't suppose it'll happen for 7.1.

            regards, tom lane

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: Can PostGreSQL handle 100 user database?
Next
From: martin.chantler@convergys.com
Date:
Subject: Re: Can PostGreSQL handle 100 user database - more info