mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add missing pgcrypto files.
This commit is contained in:
17
contrib/pgcrypto/sql/crypt-md5.sql
Normal file
17
contrib/pgcrypto/sql/crypt-md5.sql
Normal file
@ -0,0 +1,17 @@
|
||||
--
|
||||
-- crypt() and gen_salt(): md5
|
||||
--
|
||||
|
||||
select crypt('', '$1$Szzz0yzz');
|
||||
|
||||
select crypt('foox', '$1$Szzz0yzz');
|
||||
|
||||
create table ctest (data text, res text, salt text);
|
||||
insert into ctest values ('password', '', '');
|
||||
|
||||
update ctest set salt = gen_salt('md5');
|
||||
update ctest set res = crypt(data, salt);
|
||||
select res = crypt(data, res) as "worked" from ctest;
|
||||
|
||||
drop table ctest;
|
||||
|
Reference in New Issue
Block a user