1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Update /contrib for "autocommit TO 'on'".

Create objects in public schema.

Make spacing/capitalization consistent.

Remove transaction block use for object creation.

Remove unneeded function GRANTs.
This commit is contained in:
Bruce Momjian
2002-10-18 18:41:22 +00:00
parent fb9bc342ff
commit aa4c702eac
91 changed files with 3530 additions and 2643 deletions

View File

@ -2,16 +2,19 @@
-- crypt() and gen_salt(): bcrypt
--
select crypt('', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
SET autocommit TO 'on';
select crypt('foox', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
SELECT crypt('', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
create table ctest (data text, res text, salt text);
insert into ctest values ('password', '', '');
SELECT crypt('foox', '$2a$06$RQiOJ.3ELirrXwxIZY8q0O');
update ctest set salt = gen_salt('bf', 8);
update ctest set res = crypt(data, salt);
select res = crypt(data, res) as "worked" from ctest;
CREATE TABLE ctest (data text, res text, salt text);
INSERT INTO ctest VALUES ('password', '', '');
drop table ctest;
UPDATE ctest SET salt = gen_salt('bf', 8);
UPDATE ctest SET res = crypt(data, salt);
SELECT res = crypt(data, res) AS "worked"
FROM ctest;
DROP TABLE ctest;