Re: Storing images in PostgreSQL databases (again)

Поиск
Список
Период
Сортировка
От Gregory S. Williamson
Тема Re: Storing images in PostgreSQL databases (again)
Дата
Msg-id 71E37EF6B7DCC1499CEA0316A256832802B3E6C6@loki.wc.globexplorer.net
обсуждение исходный текст
Ответ на Re: Storing images in PostgreSQL databases (again)  (Jean-Christophe Roux <jcxxr@yahoo.com>)
Список pgsql-general
Hate to suggest corporate software, but there is an Informix/Illustra blade that could do something like what you're
after(I remember a demo of sunset/sunrise photos being selected on the basis of color values) ... 

But I think they used smart blobs and didn't use them as key values.

G

-----Original Message-----
From:    pgsql-general-owner@postgresql.org on behalf of Jean-Christophe Roux
Sent:    Thu 10/5/2006 4:54 PM
To:    Alexander Staubo
Cc:    pgsql-general@postgresql.org
Subject:    Re: [GENERAL] Storing images in PostgreSQL databases (again)

Why would I set a bytea column (containing picures) as a primary key? Because I want to be sure that the same image is
insertedonly once (that requirement comes from a real project) and using a primary key for that purpose makes sense to
me. 
Am I going to retrieve an image row by its image data? I would certainly like! For instance, I would like to get the
pictureswhose main color is green (requirement from a real project), and a  
select * from images where main_color(image) = 'green' would be nice.
JCR


----- Original Message ----
From: Alexander Staubo <alex@purefiction.net>
To: Jean-Christophe Roux <jcxxr@yahoo.com>
Cc: pgsql-general@postgresql.org
Sent: Thursday, October 5, 2006 7:35:04 PM
Subject: Re: [GENERAL] Storing images in PostgreSQL databases (again)

On Oct 6, 2006, at 01:29 , Jean-Christophe Roux wrote:

> By the way, is it practical to set a bytea column (containing
> pictures) as primary key? That would severely slow down many
> operations I guess.

Why would you? It's possible, but completely impractical, since image
data typically exceeds the index page size. Moreover, are you really
going to retrieve an image row by its image data?

Alexander.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly









-------------------------------------------------------
Click link below if it is SPAM gsw@globexplorer.com

"https://mailscanner.globexplorer.com/dspam/dspam.cgi?signatureID=4526a19c122019835456387&user=gsw@globexplorer.com&retrain=spam&template=history&history_page=1"
!DSPAM:4526a19c122019835456387!
-------------------------------------------------------




В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Alter table alter column
Следующее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: exploiting features of pg to obtain polymorphism maintaining ref. integrity