From: | "Marko Kreen" <markokr(at)gmail(dot)com> |
---|---|
To: | "Manuel Sugawara" <masm(at)fciencias(dot)unam(dot)mx> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Segmentation fault using digest from pg_crypto |
Date: | 2007-08-24 07:13:27 |
Message-ID: | e51f66da0708240013t40451787ub12b65bdcf6b86c1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
That means if you use function signatures from 8.0 with
pgcrypto from 8.2, they will crash on NULL.
To fix it, just reinitialize functions: \i pgcrypto.sql
--
marko
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2007-08-24 07:27:30 | Re: Segmentation fault using digest from pg_crypto |
Previous Message | Greg Smith | 2007-08-24 05:17:46 | Re: Final background writer cleanup for 8.3 |