Re: bytea or blobs?

From: Dana Hudes <dhudes(at)tcp-ip(dot)info>
To: beyaNet Consultancy <beyanet(at)ntlworld(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: bytea or blobs?
Date: 2004-02-15 18:44:46
Message-ID: Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm in the same situation. I struggled with it for days
considering various implementation issues for my application
and what I hoped to achieve. I opted to use bytea but getting the
data in and out is going to be interesting . have to use encode/decode.
However I don't have to worry about making triggers and associated
to invoke lo_import/export/unlink.

There is no true BLOB in Postgresql.
There is use of OID column and lo_import et al and there is bytea.

My objective to assure integrity of the database lead me to want bytea.
I am not by any means done with the situation and would welcome
discussion.
I'm using Perl for my application language.

On Wed, 11 Feb 2004, beyaNet Consultancy wrote:

> Hi,
> what I am trying to do is to be able to store images in my database.
> What I wanted to know is this:
>
> 1. Would it be better to have the image field type as a bytea or a
> blob? I have heard it mentioned that bytea would be better as doing
> data dumps would also insure that the image was saved as well!
>
> 2. Would it be better to make reference to mp3 files (i.e. storing the
> address of the image /images/*.jpg) or is it feasible to store the mp3
> in the database as bytea or blobs as well?
>
> many thanks in adavance
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2004-02-15 19:02:49 Re: ORDER BY TIMESTAMP_column ASC, NULL first
Previous Message Tom Lane 2004-02-15 18:38:40 Re: Passing composite values to functions