diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2013-11-10 09:20:52 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2013-11-10 14:48:29 -0500 |
commit | 001e114b8d59f4eaf2a314a2bc5e57078afdf82f (patch) | |
tree | 606fa622be346ef917886a29aea7e17383e00d31 /contrib | |
parent | dca09ac53329e92d73f45674957c26d3d7ae5117 (diff) | |
download | postgresql-001e114b8d59f4eaf2a314a2bc5e57078afdf82f.tar.gz postgresql-001e114b8d59f4eaf2a314a2bc5e57078afdf82f.zip |
Fix whitespace issues found by git diff --check, add gitattributes
Set per file type attributes in .gitattributes to fine-tune whitespace
checks. With the associated cleanups, the tree is now clean for git
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/hstore/hstore--1.1--1.2.sql | 4 | ||||
-rw-r--r-- | contrib/hstore/sql/hstore.sql | 1 | ||||
-rwxr-xr-x | contrib/intarray/bench/bench.pl | 2 | ||||
-rw-r--r-- | contrib/pgbench/pgbench.c | 18 | ||||
-rw-r--r-- | contrib/pgcrypto/expected/pgp-encrypt.out | 36 | ||||
-rw-r--r-- | contrib/pgcrypto/sql/pgp-encrypt.sql | 36 |
6 files changed, 47 insertions, 50 deletions
diff --git a/contrib/hstore/hstore--1.1--1.2.sql b/contrib/hstore/hstore--1.1--1.2.sql index 9c127d44033..a868ffe48e1 100644 --- a/contrib/hstore/hstore--1.1--1.2.sql +++ b/contrib/hstore/hstore--1.1--1.2.sql @@ -5,7 +5,7 @@ -- A version of 1.1 was shipped with these objects mistakenly in 9.3.0. --- Therefore we only add them if we detect that they aren't already there and +-- Therefore we only add them if we detect that they aren't already there and -- dependent on the extension. DO LANGUAGE plpgsql @@ -26,7 +26,7 @@ BEGIN AND x.extname = 'hstore'; IF NOT FOUND - THEN + THEN CREATE FUNCTION hstore_to_json(hstore) RETURNS json diff --git a/contrib/hstore/sql/hstore.sql b/contrib/hstore/sql/hstore.sql index 68b74bfcff5..9518f569ecf 100644 --- a/contrib/hstore/sql/hstore.sql +++ b/contrib/hstore/sql/hstore.sql @@ -341,4 +341,3 @@ insert into test_json_agg values ('rec1','"a key" =>1, b => t, c => null, d=> 12 ('rec2','"a key" =>2, b => f, c => "null", d=> -12345, e => 012345.6, f=> -1.234, g=> 0.345e-4'); select json_agg(q) from test_json_agg q; select json_agg(q) from (select f1, hstore_to_json_loose(f2) as f2 from test_json_agg) q; - diff --git a/contrib/intarray/bench/bench.pl b/contrib/intarray/bench/bench.pl index 87462911147..76f66288c0f 100755 --- a/contrib/intarray/bench/bench.pl +++ b/contrib/intarray/bench/bench.pl @@ -80,7 +80,7 @@ else $outf = ($opt{u}) ? 'distinct( message.mid )' : 'message.mid'; } my $sql = - "select $outf from " + "select $outf from " . join(', ', keys %table) . " where " . join(' AND ', @where) . ';'; diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 816400f6dd8..fff71e526f3 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -368,8 +368,7 @@ usage(void) " -j, --jobs=NUM number of threads (default: 1)\n" " -l, --log write transaction times to log file\n" " -M, --protocol=simple|extended|prepared\n" - " protocol for submitting queries " - "(default: simple)\n" + " protocol for submitting queries (default: simple)\n" " -n, --no-vacuum do not run VACUUM before tests\n" " -N, --skip-some-updates skip updates of pgbench_tellers and pgbench_branches\n" " -P, --progress=NUM show thread progress report every NUM seconds\n" @@ -377,8 +376,7 @@ usage(void) " -R, --rate=NUM target rate in transactions per second\n" " -s, --scale=NUM report this scale factor in output\n" " -S, --select-only perform SELECT-only transactions\n" - " -t, --transactions number of transactions each client runs " - "(default: 10)\n" + " -t, --transactions number of transactions each client runs (default: 10)\n" " -T, --time=NUM duration of benchmark test in seconds\n" " -v, --vacuum-all vacuum all four standard tables before tests\n" " --aggregate-interval=NUM aggregate data over NUM seconds\n" @@ -933,7 +931,7 @@ top: * Use inverse transform sampling to randomly generate a delay, such * that the series of delays will approximate a Poisson distribution * centered on the throttle_delay time. - * + * * 10000 implies a 9.2 (-log(1/10000)) to 0.0 (log 1) delay multiplier, * and results in a 0.055 % target underestimation bias: * @@ -1211,9 +1209,9 @@ top: } /* - * This ensures that a throttling delay is inserted before proceeding - * with sql commands, after the first transaction. The first transaction - * throttling is performed when first entering doCustom. + * This ensures that a throttling delay is inserted before proceeding + * with sql commands, after the first transaction. The first transaction + * throttling is performed when first entering doCustom. */ if (trans_needs_throttle) { trans_needs_throttle = false; @@ -2180,7 +2178,7 @@ printResults(int ttype, int normal_xacts, int nclients, latency, 0.001 * sqrt(sqlat - 1000000.0 * latency * latency)); } else - { + { /* only an average latency computed from the duration is available */ printf("latency average: %.3f ms\n", 1000.0 * duration * nclients / normal_xacts); @@ -2569,7 +2567,7 @@ main(int argc, char **argv) } } - /* compute a per thread delay */ + /* compute a per thread delay */ throttle_delay *= nthreads; if (argc > optind) diff --git a/contrib/pgcrypto/expected/pgp-encrypt.out b/contrib/pgcrypto/expected/pgp-encrypt.out index 8ef3875fd68..b35de79afa7 100644 --- a/contrib/pgcrypto/expected/pgp-encrypt.out +++ b/contrib/pgcrypto/expected/pgp-encrypt.out @@ -11,7 +11,7 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key'); -- check whether the defaults are ok select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), - 'key', 'expect-cipher-algo=aes128, + 'key', 'expect-cipher-algo=aes128, expect-disable-mdc=0, expect-sess-key=0, expect-s2k-mode=3, @@ -25,7 +25,7 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), -- maybe the expect- stuff simply does not work select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), - 'key', 'expect-cipher-algo=bf, + 'key', 'expect-cipher-algo=bf, expect-disable-mdc=1, expect-sess-key=1, expect-s2k-mode=0, @@ -56,7 +56,7 @@ select pgp_sym_decrypt_bytea(pgp_sym_encrypt('Text', 'baz'), 'baz'); -- algorithm change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=bf'), - 'key', 'expect-cipher-algo=bf'); + 'key', 'expect-cipher-algo=bf'); pgp_sym_decrypt ----------------- Secret. @@ -64,7 +64,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes'), - 'key', 'expect-cipher-algo=aes128'); + 'key', 'expect-cipher-algo=aes128'); pgp_sym_decrypt ----------------- Secret. @@ -72,7 +72,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes192'), - 'key', 'expect-cipher-algo=aes192'); + 'key', 'expect-cipher-algo=aes192'); pgp_sym_decrypt ----------------- Secret. @@ -81,7 +81,7 @@ select pgp_sym_decrypt( -- s2k change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=0'), - 'key', 'expect-s2k-mode=0'); + 'key', 'expect-s2k-mode=0'); pgp_sym_decrypt ----------------- Secret. @@ -89,7 +89,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=1'), - 'key', 'expect-s2k-mode=1'); + 'key', 'expect-s2k-mode=1'); pgp_sym_decrypt ----------------- Secret. @@ -97,7 +97,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=3'), - 'key', 'expect-s2k-mode=3'); + 'key', 'expect-s2k-mode=3'); pgp_sym_decrypt ----------------- Secret. @@ -106,7 +106,7 @@ select pgp_sym_decrypt( -- s2k digest change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=md5'), - 'key', 'expect-s2k-digest-algo=md5'); + 'key', 'expect-s2k-digest-algo=md5'); pgp_sym_decrypt ----------------- Secret. @@ -114,7 +114,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=sha1'), - 'key', 'expect-s2k-digest-algo=sha1'); + 'key', 'expect-s2k-digest-algo=sha1'); pgp_sym_decrypt ----------------- Secret. @@ -123,7 +123,7 @@ select pgp_sym_decrypt( -- sess key select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=0'), - 'key', 'expect-sess-key=0'); + 'key', 'expect-sess-key=0'); pgp_sym_decrypt ----------------- Secret. @@ -131,7 +131,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1'), - 'key', 'expect-sess-key=1'); + 'key', 'expect-sess-key=1'); pgp_sym_decrypt ----------------- Secret. @@ -139,7 +139,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=bf'), - 'key', 'expect-sess-key=1, expect-cipher-algo=bf'); + 'key', 'expect-sess-key=1, expect-cipher-algo=bf'); pgp_sym_decrypt ----------------- Secret. @@ -147,7 +147,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes192'), - 'key', 'expect-sess-key=1, expect-cipher-algo=aes192'); + 'key', 'expect-sess-key=1, expect-cipher-algo=aes192'); pgp_sym_decrypt ----------------- Secret. @@ -155,7 +155,7 @@ select pgp_sym_decrypt( select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes256'), - 'key', 'expect-sess-key=1, expect-cipher-algo=aes256'); + 'key', 'expect-sess-key=1, expect-cipher-algo=aes256'); pgp_sym_decrypt ----------------- Secret. @@ -164,7 +164,7 @@ select pgp_sym_decrypt( -- no mdc select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'disable-mdc=1'), - 'key', 'expect-disable-mdc=1'); + 'key', 'expect-disable-mdc=1'); pgp_sym_decrypt ----------------- Secret. @@ -173,7 +173,7 @@ select pgp_sym_decrypt( -- crlf select encode(pgp_sym_decrypt_bytea( pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'), - 'key'), 'hex'); + 'key'), 'hex'); encode ---------------------- 310d0a320d0a330d0d0a @@ -182,7 +182,7 @@ select encode(pgp_sym_decrypt_bytea( -- conversion should be lossless select encode(digest(pgp_sym_decrypt( pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'), - 'key', 'convert-crlf=1'), 'sha1'), 'hex') as result, + 'key', 'convert-crlf=1'), 'sha1'), 'hex') as result, encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect; result | expect ------------------------------------------+------------------------------------------ diff --git a/contrib/pgcrypto/sql/pgp-encrypt.sql b/contrib/pgcrypto/sql/pgp-encrypt.sql index cac37c84422..a9ac0b924b7 100644 --- a/contrib/pgcrypto/sql/pgp-encrypt.sql +++ b/contrib/pgcrypto/sql/pgp-encrypt.sql @@ -8,7 +8,7 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), 'key'); -- check whether the defaults are ok select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), - 'key', 'expect-cipher-algo=aes128, + 'key', 'expect-cipher-algo=aes128, expect-disable-mdc=0, expect-sess-key=0, expect-s2k-mode=3, @@ -18,7 +18,7 @@ select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), -- maybe the expect- stuff simply does not work select pgp_sym_decrypt(pgp_sym_encrypt('Secret.', 'key'), - 'key', 'expect-cipher-algo=bf, + 'key', 'expect-cipher-algo=bf, expect-disable-mdc=1, expect-sess-key=1, expect-s2k-mode=0, @@ -36,62 +36,62 @@ select pgp_sym_decrypt_bytea(pgp_sym_encrypt('Text', 'baz'), 'baz'); -- algorithm change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=bf'), - 'key', 'expect-cipher-algo=bf'); + 'key', 'expect-cipher-algo=bf'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes'), - 'key', 'expect-cipher-algo=aes128'); + 'key', 'expect-cipher-algo=aes128'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'cipher-algo=aes192'), - 'key', 'expect-cipher-algo=aes192'); + 'key', 'expect-cipher-algo=aes192'); -- s2k change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=0'), - 'key', 'expect-s2k-mode=0'); + 'key', 'expect-s2k-mode=0'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=1'), - 'key', 'expect-s2k-mode=1'); + 'key', 'expect-s2k-mode=1'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-mode=3'), - 'key', 'expect-s2k-mode=3'); + 'key', 'expect-s2k-mode=3'); -- s2k digest change select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=md5'), - 'key', 'expect-s2k-digest-algo=md5'); + 'key', 'expect-s2k-digest-algo=md5'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 's2k-digest-algo=sha1'), - 'key', 'expect-s2k-digest-algo=sha1'); + 'key', 'expect-s2k-digest-algo=sha1'); -- sess key select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=0'), - 'key', 'expect-sess-key=0'); + 'key', 'expect-sess-key=0'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1'), - 'key', 'expect-sess-key=1'); + 'key', 'expect-sess-key=1'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=bf'), - 'key', 'expect-sess-key=1, expect-cipher-algo=bf'); + 'key', 'expect-sess-key=1, expect-cipher-algo=bf'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes192'), - 'key', 'expect-sess-key=1, expect-cipher-algo=aes192'); + 'key', 'expect-sess-key=1, expect-cipher-algo=aes192'); select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'sess-key=1, cipher-algo=aes256'), - 'key', 'expect-sess-key=1, expect-cipher-algo=aes256'); + 'key', 'expect-sess-key=1, expect-cipher-algo=aes256'); -- no mdc select pgp_sym_decrypt( pgp_sym_encrypt('Secret.', 'key', 'disable-mdc=1'), - 'key', 'expect-disable-mdc=1'); + 'key', 'expect-disable-mdc=1'); -- crlf select encode(pgp_sym_decrypt_bytea( pgp_sym_encrypt(E'1\n2\n3\r\n', 'key', 'convert-crlf=1'), - 'key'), 'hex'); + 'key'), 'hex'); -- conversion should be lossless select encode(digest(pgp_sym_decrypt( pgp_sym_encrypt(E'\r\n0\n1\r\r\n\n2\r', 'key', 'convert-crlf=1'), - 'key', 'convert-crlf=1'), 'sha1'), 'hex') as result, + 'key', 'convert-crlf=1'), 'sha1'), 'hex') as result, encode(digest(E'\r\n0\n1\r\r\n\n2\r', 'sha1'), 'hex') as expect; |