summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2009-08-04 18:49:50 +0000
committerTom Lane2009-08-04 18:49:50 +0000
commit4e0d25373057750cfde0c1afdeba5ec33d340c2e (patch)
treef9ecd5f414c6aae8501c13da13bd7b024bc13a56
parent43ffd0cae3da90dc5dee8db4a54099eae16e23c4 (diff)
Ooops, missed that a couple of contrib modules have calls to byteacmp.
Add bytea.h inclusions as needed. Some of the contrib regression tests need to be de-hexified, too. Per buildfarm.
-rw-r--r--contrib/btree_gin/btree_gin.c1
-rw-r--r--contrib/btree_gin/expected/bytea.out2
-rw-r--r--contrib/btree_gin/sql/bytea.sql2
-rw-r--r--contrib/btree_gist/btree_bit.c2
-rw-r--r--contrib/btree_gist/btree_bytea.c2
-rw-r--r--contrib/citext/expected/citext.out15
-rw-r--r--contrib/citext/expected/citext_1.out15
-rw-r--r--contrib/citext/sql/citext.sql3
-rw-r--r--contrib/pgcrypto/expected/blowfish.out2
-rw-r--r--contrib/pgcrypto/expected/init.out2
-rw-r--r--contrib/pgcrypto/expected/pgp-armor.out40
-rw-r--r--contrib/pgcrypto/expected/pgp-encrypt.out2
-rw-r--r--contrib/pgcrypto/expected/pgp-pubkey-encrypt.out2
-rw-r--r--contrib/pgcrypto/expected/rijndael.out2
-rw-r--r--contrib/pgcrypto/sql/blowfish.sql2
-rw-r--r--contrib/pgcrypto/sql/init.sql3
-rw-r--r--contrib/pgcrypto/sql/pgp-armor.sql2
-rw-r--r--contrib/pgcrypto/sql/pgp-encrypt.sql2
-rw-r--r--contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql2
-rw-r--r--contrib/pgcrypto/sql/rijndael.sql2
20 files changed, 57 insertions, 48 deletions
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c
index 4019f59e49..7245fd88a0 100644
--- a/contrib/btree_gin/btree_gin.c
+++ b/contrib/btree_gin/btree_gin.c
@@ -8,6 +8,7 @@
#include "fmgr.h"
#include "access/skey.h"
#include "utils/builtins.h"
+#include "utils/bytea.h"
#include "utils/cash.h"
#include "utils/date.h"
#include "utils/inet.h"
diff --git a/contrib/btree_gin/expected/bytea.out b/contrib/btree_gin/expected/bytea.out
index 7b19149205..8b5a0c615d 100644
--- a/contrib/btree_gin/expected/bytea.out
+++ b/contrib/btree_gin/expected/bytea.out
@@ -1,4 +1,6 @@
set enable_seqscan=off;
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
CREATE TABLE test_bytea (
i bytea
);
diff --git a/contrib/btree_gin/sql/bytea.sql b/contrib/btree_gin/sql/bytea.sql
index 96be56bf65..0ef6247e10 100644
--- a/contrib/btree_gin/sql/bytea.sql
+++ b/contrib/btree_gin/sql/bytea.sql
@@ -1,4 +1,6 @@
set enable_seqscan=off;
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
CREATE TABLE test_bytea (
i bytea
diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index 92ff998fa0..27b84e756b 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -3,7 +3,7 @@
*/
#include "btree_gist.h"
#include "btree_utils_var.h"
-#include "utils/builtins.h"
+#include "utils/bytea.h"
#include "utils/varbit.h"
diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c
index 90090d7a44..cbb65925f6 100644
--- a/contrib/btree_gist/btree_bytea.c
+++ b/contrib/btree_gist/btree_bytea.c
@@ -3,7 +3,7 @@
*/
#include "btree_gist.h"
#include "btree_utils_var.h"
-#include "utils/builtins.h"
+#include "utils/bytea.h"
/*
diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 3694cb8b5b..21e73be2d7 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -271,10 +271,13 @@ SELECT name, 'A' = name AS t FROM try where name = 'A';
-- expected failures on duplicate key
INSERT INTO try (name) VALUES ('a');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(a) already exists.
INSERT INTO try (name) VALUES ('A');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(A) already exists.
INSERT INTO try (name) VALUES ('aB');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(aB) already exists.
-- Make sure that citext_smaller() and citext_lager() work properly.
SELECT citext_smaller( 'aa'::citext, 'ab'::citext ) = 'aa' AS t;
t
@@ -734,18 +737,6 @@ SELECT 'f'::citext::"char" = 'f'::"char" AS t;
t
(1 row)
-SELECT 'foo'::bytea::citext = 'foo' AS t;
- t
----
- t
-(1 row)
-
-SELECT 'foo'::citext::bytea = 'foo'::bytea AS t;
- t
----
- t
-(1 row)
-
SELECT '100'::money::citext = '$100.00' AS t;
t
---
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 1a6bcdf0bc..5fa537bc19 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -271,10 +271,13 @@ SELECT name, 'A' = name AS t FROM try where name = 'A';
-- expected failures on duplicate key
INSERT INTO try (name) VALUES ('a');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(a) already exists.
INSERT INTO try (name) VALUES ('A');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(A) already exists.
INSERT INTO try (name) VALUES ('aB');
ERROR: duplicate key value violates unique constraint "try_pkey"
+DETAIL: Key (name)=(aB) already exists.
-- Make sure that citext_smaller() and citext_lager() work properly.
SELECT citext_smaller( 'aa'::citext, 'ab'::citext ) = 'aa' AS t;
t
@@ -734,18 +737,6 @@ SELECT 'f'::citext::"char" = 'f'::"char" AS t;
t
(1 row)
-SELECT 'foo'::bytea::citext = 'foo' AS t;
- t
----
- t
-(1 row)
-
-SELECT 'foo'::citext::bytea = 'foo'::bytea AS t;
- t
----
- t
-(1 row)
-
SELECT '100'::money::citext = '$100.00' AS t;
t
---
diff --git a/contrib/citext/sql/citext.sql b/contrib/citext/sql/citext.sql
index 52999c2e63..9014e5d931 100644
--- a/contrib/citext/sql/citext.sql
+++ b/contrib/citext/sql/citext.sql
@@ -226,9 +226,6 @@ SELECT 'f'::citext::char = 'f'::char AS t;
SELECT 'f'::"char"::citext = 'f' AS t;
SELECT 'f'::citext::"char" = 'f'::"char" AS t;
-SELECT 'foo'::bytea::citext = 'foo' AS t;
-SELECT 'foo'::citext::bytea = 'foo'::bytea AS t;
-
SELECT '100'::money::citext = '$100.00' AS t;
SELECT '100'::citext::money = '100'::money AS t;
diff --git a/contrib/pgcrypto/expected/blowfish.out b/contrib/pgcrypto/expected/blowfish.out
index 5c09cf5cd9..86c3244cec 100644
--- a/contrib/pgcrypto/expected/blowfish.out
+++ b/contrib/pgcrypto/expected/blowfish.out
@@ -1,6 +1,8 @@
--
-- Blowfish cipher
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- some standard Blowfish testvalues
SELECT encode(encrypt(
decode('0000000000000000', 'hex'),
diff --git a/contrib/pgcrypto/expected/init.out b/contrib/pgcrypto/expected/init.out
index 6a5710d5a1..4cb1081997 100644
--- a/contrib/pgcrypto/expected/init.out
+++ b/contrib/pgcrypto/expected/init.out
@@ -8,6 +8,8 @@
SET client_min_messages = warning;
\set ECHO none
RESET client_min_messages;
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- check for encoding fn's
SELECT encode('foo', 'hex');
encode
diff --git a/contrib/pgcrypto/expected/pgp-armor.out b/contrib/pgcrypto/expected/pgp-armor.out
index 1655f13318..1bb2461596 100644
--- a/contrib/pgcrypto/expected/pgp-armor.out
+++ b/contrib/pgcrypto/expected/pgp-armor.out
@@ -1,50 +1,52 @@
--
-- PGP Armor
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
select armor('');
armor
-----------------------------
-----BEGIN PGP MESSAGE-----
-
- =twTO
- -----END PGP MESSAGE-----
-
+
+ =twTO
+ -----END PGP MESSAGE-----
+
(1 row)
select armor('test');
armor
-----------------------------
-----BEGIN PGP MESSAGE-----
-
- dGVzdA==
- =+G7Q
- -----END PGP MESSAGE-----
-
+
+ dGVzdA==
+ =+G7Q
+ -----END PGP MESSAGE-----
+
(1 row)
select dearmor(armor(''));
dearmor
---------
-
+
(1 row)
select dearmor(armor('zooka'));
dearmor
---------
- zooka
+ zooka
(1 row)
select armor('0123456789abcdef0123456789abcdef0123456789abcdef
0123456789abcdef0123456789abcdef0123456789abcdef');
armor
------------------------------------------------------------------------------
- -----BEGIN PGP MESSAGE-----
-
+ -----BEGIN PGP MESSAGE-----
+
MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmCjAxMjM0NTY3
- ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
- =JFw5
- -----END PGP MESSAGE-----
-
+ ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZg==
+ =JFw5
+ -----END PGP MESSAGE-----
+
(1 row)
-- lots formatting
@@ -60,7 +62,7 @@ em9va2E=
-----END PGP MESSAGE-----');
dearmor
---------
- zooka
+ zooka
(1 row)
-- lots messages
@@ -88,7 +90,7 @@ d3Jvbmc=
');
dearmor
---------
- right
+ right
(1 row)
-- bad crc
diff --git a/contrib/pgcrypto/expected/pgp-encrypt.out b/contrib/pgcrypto/expected/pgp-encrypt.out
index 637b473837..8ef3875fd6 100644
--- a/contrib/pgcrypto/expected/pgp-encrypt.out
+++ b/contrib/pgcrypto/expected/pgp-encrypt.out
@@ -1,6 +1,8 @@
--
-- PGP encrypt
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key');
pgp_sym_decrypt
-----------------
diff --git a/contrib/pgcrypto/expected/pgp-pubkey-encrypt.out b/contrib/pgcrypto/expected/pgp-pubkey-encrypt.out
index e222541c24..df2756c4d0 100644
--- a/contrib/pgcrypto/expected/pgp-pubkey-encrypt.out
+++ b/contrib/pgcrypto/expected/pgp-pubkey-encrypt.out
@@ -1,6 +1,8 @@
--
-- PGP Public Key Encryption
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- successful encrypt/decrypt
select pgp_pub_decrypt(
pgp_pub_encrypt('Secret msg', dearmor(pubkey)),
diff --git a/contrib/pgcrypto/expected/rijndael.out b/contrib/pgcrypto/expected/rijndael.out
index cb336e335d..106181ef22 100644
--- a/contrib/pgcrypto/expected/rijndael.out
+++ b/contrib/pgcrypto/expected/rijndael.out
@@ -1,6 +1,8 @@
--
-- AES / Rijndael-128 cipher
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- some standard Rijndael testvalues
SELECT encode(encrypt(
decode('00112233445566778899aabbccddeeff', 'hex'),
diff --git a/contrib/pgcrypto/sql/blowfish.sql b/contrib/pgcrypto/sql/blowfish.sql
index c0383f5421..1a8536d686 100644
--- a/contrib/pgcrypto/sql/blowfish.sql
+++ b/contrib/pgcrypto/sql/blowfish.sql
@@ -1,6 +1,8 @@
--
-- Blowfish cipher
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- some standard Blowfish testvalues
SELECT encode(encrypt(
diff --git a/contrib/pgcrypto/sql/init.sql b/contrib/pgcrypto/sql/init.sql
index a58b3f0144..ee1c231bdc 100644
--- a/contrib/pgcrypto/sql/init.sql
+++ b/contrib/pgcrypto/sql/init.sql
@@ -12,6 +12,9 @@ SET client_min_messages = warning;
\set ECHO all
RESET client_min_messages;
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
+
-- check for encoding fn's
SELECT encode('foo', 'hex');
SELECT decode('666f6f', 'hex');
diff --git a/contrib/pgcrypto/sql/pgp-armor.sql b/contrib/pgcrypto/sql/pgp-armor.sql
index 040c4ac038..71ffba26a0 100644
--- a/contrib/pgcrypto/sql/pgp-armor.sql
+++ b/contrib/pgcrypto/sql/pgp-armor.sql
@@ -1,6 +1,8 @@
--
-- PGP Armor
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
select armor('');
select armor('test');
diff --git a/contrib/pgcrypto/sql/pgp-encrypt.sql b/contrib/pgcrypto/sql/pgp-encrypt.sql
index 03b34c8ad2..218bd419e5 100644
--- a/contrib/pgcrypto/sql/pgp-encrypt.sql
+++ b/contrib/pgcrypto/sql/pgp-encrypt.sql
@@ -1,6 +1,8 @@
--
-- PGP encrypt
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key');
diff --git a/contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql b/contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql
index 62dd487c10..2c4e622e5c 100644
--- a/contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql
+++ b/contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql
@@ -1,6 +1,8 @@
--
-- PGP Public Key Encryption
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- successful encrypt/decrypt
select pgp_pub_decrypt(
diff --git a/contrib/pgcrypto/sql/rijndael.sql b/contrib/pgcrypto/sql/rijndael.sql
index 4d6af0ffaa..428ad1332c 100644
--- a/contrib/pgcrypto/sql/rijndael.sql
+++ b/contrib/pgcrypto/sql/rijndael.sql
@@ -1,6 +1,8 @@
--
-- AES / Rijndael-128 cipher
--
+-- ensure consistent test output regardless of the default bytea format
+SET bytea_output TO escape;
-- some standard Rijndael testvalues
SELECT encode(encrypt(