you could store the pkey as a md5 or sha1
of the image's data. or any of the other large hashing algorithms.
that way your index only has to compare 32 or 40 bytes instead of kilobytes per
row. as for the main color, you could generate histogram-like
columns (or even a single column) with the relative strengths of each channel
and store them into a smallint or bitstring. you could then do whatever you
wanted per channel and it could be indexed. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Christophe Roux Why would I set a bytea
column (containing picures) as a primary key? Because I want to be sure that
the same image is inserted only once (that requirement comes from a real
project) and using a primary key for that purpose makes sense to me. ----- Original Message
---- On Oct 6, 2006, at 01:29 , Jean-Christophe Roux wrote: |
- Re: [GENERAL] Storing images in PostgreSQL databases... Jacob Coby
- Re: [GENERAL] Storing images in PostgreSQL data... Gregory S. Williamson
- Re: [GENERAL] Storing images in PostgreSQL data... Karsten Hilbert
- Re: [GENERAL] Storing images in PostgreSQL data... Michelle Konzack
- Re: [GENERAL] Storing images in PostgreSQL data... Robert L Mathews
- Re: [GENERAL] Storing images in PostgreSQL ... Alexander Staubo