pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dana Hudes <dhudes@tcp-ip.info>
To: beyaNet Consultancy <beyanet@ntlworld.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: bytea or blobs?
Date: Sun, 15 Feb 2004 13:44:46 -0500 (EST)
Message-ID: <Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info> (raw)
In-Reply-To: <E8D7DFA4-5C92-11D8-B55E-0003938366A4@ntlworld.com>
References: <E8D7DFA4-5C92-11D8-B55E-0003938366A4@ntlworld.com>

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
> 



view thread (14+ messages)  latest in thread

Message-ID: <Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info>
Permalink:  ../Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info/
Also on:    postgresql.org/message-id/Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: dhudes@tcp-ip.info, beyanet@ntlworld.com
  Subject: Re: bytea or blobs?
  In-Reply-To: <Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info>
  References: <E8D7DFA4-5C92-11D8-B55E-0003938366A4@ntlworld.com> <Pine.LNX.4.58.0402151341240.3073@screamer.tcp-ip.info>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox