Re: BUG #5243: Segmentation fault when sending null to crypt();

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5243: Segmentation fault when sending null to crypt();
Дата
Msg-id 11687.1260816013@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5243: Segmentation fault when sending null to crypt();  ("Greg Johnson" <greg.johnson@interprose.com>)
Список pgsql-bugs
"Greg Johnson" <greg.johnson@interprose.com> writes:
> Postgresql version 8.4.1 and 8.3.8 both seg fault when you pass null into
> crypt function.

> select crypt(null, gen_salt('md5'));

Not if the crypt function is properly defined:

CREATE OR REPLACE FUNCTION crypt(text, text)
RETURNS text
AS 'MODULE_PATHNAME', 'pg_crypt'
LANGUAGE C IMMUTABLE STRICT;

The CVS history shows that the STRICT marker was added in 8.1.
If you are still using pre-8.1 definitions of the pgcrypto
functions (no doubt via a long chain of dump/reload), you really need to
update them to current, because you're missing a lot of functionality.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Greg Johnson"
Дата:
Сообщение: BUG #5243: Segmentation fault when sending null to crypt();
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Invalid explain output for multi-plan statements