Re: contrib/pgcrypto functions not IMMUTABLE?

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: contrib/pgcrypto functions not IMMUTABLE?
Дата
Msg-id 20050703144318.GA23919@l-t.ee
обсуждение исходный текст
Ответ на Re: contrib/pgcrypto functions not IMMUTABLE?  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: contrib/pgcrypto functions not IMMUTABLE?  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
On Sun, Jul 03, 2005 at 07:54:47AM -0600, Michael Fuhr wrote:
> I'll submit a patch.  Does the following look right?
> 
> digest         IMMUTABLE STRICT
> digest_exists  IMMUTABLE STRICT
> hmac           IMMUTABLE STRICT
> hmac_exists    IMMUTABLE STRICT
> crypt          IMMUTABLE STRICT
> gen_salt       VOLATILE STRICT
> encrypt        IMMUTABLE
> decrypt        IMMUTABLE
> encrypt_iv     IMMUTABLE
> decrypt_iv     IMMUTABLE
> cipher_exists  IMMUTABLE STRICT

Nice overview.  Now that I have them before me, I think crypt() should
stay also non-strict, as it also has delicate security properties.

Everything else is OK.

> In the functions marked STRICT, should I leave the PG_ARGISNULL()
> checks in place as a precaution?  Removing those checks could cause
> problems if people use the new code but have old (non-STRICT) catalog
> entries.

Good point.  Let them be.

Rather, could you make crypt, encrypt, decrypt return error for
NULL input?  With nice message, eg. "NULL input"...

Then this topic would be solved in one go.

-- 
marko



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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: contrib/pgcrypto functions not IMMUTABLE?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Checkpoint cost, looks like it is WAL/CRC