Re: Segmentation fault using digest from pg_crypto

From: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Segmentation fault using digest from pg_crypto
Date: 2007-08-24 16:19:46
Message-ID: m3zm0gykf1.fsf@conexa.fciencias.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Marko Kreen" <markokr(at)gmail(dot)com> writes:

> On 8/24/07, Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx> wrote:
>> Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx> writes:
>> > I have a simple query that uses digest(data, 'sha1') and consistently
>> > crashes the backend
>>
>> The problem is with null arguments:
>>
>> ciencias=# select digest(null, 'sha1');
>
> In 8.0 the pgcrypto functions were non-strict and checked for NULLs.
>
> In 8.1 they were made STRICT.
>
> In 8.2 the NULL check were removed from code.

Not an smart move IMHO, I didn't create the function, it was created
as part of my upgrade process. May I suggest to put back the check?.

Regards,
Manuel.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luke Lonergan 2007-08-24 16:20:28 Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1
Previous Message Andrew Sullivan 2007-08-24 16:17:54 Re: Obfuscated definitions of database objects