Re: Blobs with perl

From: Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
To: "cristi" <cristi(at)dmhi(dot)ct(dot)ro>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Blobs with perl
Date: 2003-06-17 14:30:43
Message-ID: 200306170730.44746.jgardner@jonathangardner.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 17 June 2003 02:00, cristi wrote:
> I want to insert a picture in a table from an internet browser using a
> script made in perl.
> Has somebody a code example with this kind a problem (I need only a code
> fragment)?
>

Despite PostgreSQL's powerful BLOB features, I would strongly suggest against
storing these kind of things in the database. It is better to have it in a
local file for several reasons.

1) Apache can server up local images lightning fast
2) You can edit local images with your favorite image editor (ie, Gimp,
Photoshop)
3) You can ftp, scp, sftp the image around without a problem.
4) You can tar it up and archive it.
5) You can move it off of your burdened PostgreSQL database server machine and
on to its own image server when your site becomes popular.

While all of the above are certainly possible with PostgreSQL, it is a bit
more complicated.

And remember, while your database server is small now, it will grow, and grow,
and grow, and grow. It will one day become the bottleneck in your operations.
That is an inevitable fact of any dynamic website.

- --
Jonathan Gardner <jgardner(at)jonathangardner(dot)net>
(was jgardn(at)alumni(dot)washington(dot)edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+7yYTWgwF3QvpWNwRAv3WAKDFrjfQUpQFmZFvVMismUeoxABoDQCfY/F7
LajclhvacQOgsn+6qnLEEwQ=
=k0vW
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-06-17 14:55:51 Re: yet pg_toast reindex
Previous Message Tom Lane 2003-06-17 14:29:07 Re: [HACKERS] Our FLOAT(p) precision does not conform to spec