~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to contrib/pgcrypto/expected/init.out

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--
 
2
-- init pgcrypto
 
3
--
 
4
CREATE EXTENSION pgcrypto;
 
5
-- ensure consistent test output regardless of the default bytea format
 
6
SET bytea_output TO escape;
 
7
-- check for encoding fn's
 
8
SELECT encode('foo', 'hex');
 
9
 encode 
 
10
--------
 
11
 666f6f
 
12
(1 row)
 
13
 
 
14
SELECT decode('666f6f', 'hex');
 
15
 decode 
 
16
--------
 
17
 foo
 
18
(1 row)
 
19
 
 
20
-- check error handling
 
21
select gen_salt('foo');
 
22
ERROR:  gen_salt: Unknown salt algorithm
 
23
select digest('foo', 'foo');
 
24
ERROR:  Cannot use "foo": No such hash algorithm
 
25
select hmac('foo', 'foo', 'foo');
 
26
ERROR:  Cannot use "foo": No such hash algorithm
 
27
select encrypt('foo', 'foo', 'foo');
 
28
ERROR:  Cannot use "foo": No such cipher algorithm