On Thu, Mar 10, 2011 at 2:09 AM, Sim Zacks wrote:
>
>> > The question is, if it screws up and says that an image already exists
>> > and then returns a different image when querying for it, how bad would
>> > that be.
>> >
>>
>>
>> It'll never happen:
>>
>>
>> http://stackoverflow.com/questions/86
> The question is, if it screws up and says that an image already exists
> and then returns a different image when querying for it, how bad would
> that be.
>
It'll never happen:
http://stackoverflow.com/questions/862346/how-do-i-assess-the-hash-collision-probability
Sure you CAN go out of
On 03/08/2011 09:06 PM, Andy Colson wrote:
On 3/8/2011 12:28 PM, Andre Lopes wrote:
Hi,
I'm using a bytea field to store small images in base64. I need to
know if I can compare bytea rows for equality. To know for example if
the file already exists in the database, this is possible with bytea?
On Wed, 09 Mar 2011 13:27:16 +0200, Sim Zacks wrote:
MD5 is not collision resistant (using the immortal words of wikipedia
http://en.wikipedia.org/wiki/MD5).
This means that it is possible that multiple images will return the
same md5 hash.
The question is, if it screws up and says that an imag
On 03/09/2011 01:27 PM, Sim Zacks wrote:
This means that it is possible that multiple images will return the
same md5 hash.
OTOH, if you had an indexed md5 hash and compared the image only to the
matches, that would be a fast and accurate querying method
--
Sent via pgsql-general mailing list
MD5 is not collision resistant (using the immortal words of wikipedia
http://en.wikipedia.org/wiki/MD5).
This means that it is possible that multiple images will return the same
md5 hash.
The question is, if it screws up and says that an image already exists
and then returns a different imag
On Tue, Mar 8, 2011 at 8:00 PM, David Johnston wrote:
> You could avoid the synchronization issues by putting the hash in an
> index...in theory...I'd wait for someone else to opine on that particular
> option.
Yes, a functional index on MD5(your_bytea_column) will work and is the
way to go for
Not sure if it is possible directly but have you considered (or you might have
to) generating an MD5 hash of the data (possibly after encoding) and then
comparing the hashes? For a small image it may not matter but if you plan on
making the check with any frequency (and multiple times against t
On 3/8/2011 12:28 PM, Andre Lopes wrote:
Hi,
I'm using a bytea field to store small images in base64. I need to
know if I can compare bytea rows for equality. To know for example if
the file already exists in the database, this is possible with bytea?
Best Regads,
You dont need to use both b