Re: Data type for storing images?

From: ryan(at)paymentalliance(dot)net
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Data type for storing images?
Date: 2001-03-11 18:40:18
Message-ID: 3aabc524.433007942@news.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

I am not sure what your exact purpose is, but in doing a lot of web
work with pgsql, I usually just store the full path to the image in a
varchar field and fetch that right into the IMG SRC attribute when I
need to display the image.

I also have modified a simple web based image uploading script so upon
uploading an image it detects the images width and height and inserts
that into the DB as well. The script is written in PHP, let me know
if it would be helpful to send it to you.

Good Luck

-Ryan Mahoney

On Sun, 11 Mar 2001 22:52:53 +0000 (UTC), <drevil(at)sidereal(dot)kz> wrote:

>
>I would like to store some images in my Postgres database. These will
>all be thumbnails, limited to 4k or 5k. I know that PG has an 8k row
>limit, but this should be fine, because there's not much else in the
>row. Which data type could I use to store them, and is there a
>performance cost for having rows that are this big? The system will
>be using PG7.1, btw.
>
>Thanks
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Humphries 2001-03-11 19:41:16 Re: Anyone can create tables!
Previous Message Tom Lane 2001-03-11 17:46:28 Re: Strange Message

Browse pgsql-interfaces by date

  From Date Subject
Next Message J. T. Vermeulen 2001-03-11 19:20:10 Re: libpq++
Previous Message Tom Lane 2001-03-10 03:39:32 Re: Backend dies for DBI