Re: md5(bytea)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Abhijit Menon-Sen <ams(at)oryx(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: md5(bytea)
Date: 2005-05-19 05:28:31
Message-ID: 29075.1116480511@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Abhijit Menon-Sen <ams(at)oryx(dot)com> writes:
> At 2005-05-18 23:31:27 -0400, tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:
>> Doesn't that change cause the opr_sanity regression test to complain?

> As far as I can tell, updating the test as below is the correct thing
> to do.

No, I don't much care for that, because it gives free license for anyone
to define pg_proc entries that allow bytea values to be fed to functions
that are expecting text inputs. Many of the latter are not going to
cope very well with strings that contain embedded zero bytes, nor byte
sequences that aren't legal multibyte characters in the current encoding.

I think you need to make a separate C-level function for this. The
underlying md5 code might be the same, but text and bytea are not really
binary-equivalent.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Abhijit Menon-Sen 2005-05-19 06:17:16 Re: md5(bytea)
Previous Message Abhijit Menon-Sen 2005-05-19 05:01:07 Re: md5(bytea)