diff options
| author | Tom Lane | 2001-11-29 21:02:41 +0000 |
|---|---|---|
| committer | Tom Lane | 2001-11-29 21:02:41 +0000 |
| commit | 636a939fe54d317099e8574997d96975a54c792b (patch) | |
| tree | a355959c7fb779906dcf5b569925ae93f1953287 /src/test | |
| parent | a4e8cd306c295e4a959e04d4aa20e53d8c9ae2e6 (diff) | |
Fix array_out's failure to backslash backslashes, per bug# 524. Also,
remove brain-dead rule that double quotes are needed if and only if the
datatype is pass-by-reference; neither direction of the implication holds
water. Instead, examine the actual data string to see if it contains
any characters that force us to quote it.
Add some documentation about quoting of array values, which was previously
explained nowhere AFAICT.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/arrays.out | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 74c1008d907..f729fe1ed43 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -28,11 +28,11 @@ INSERT INTO arrtest (a, b[2][2][1], c, d, e, f, g) INSERT INTO arrtest (a, b[1][2][2], c, d[2][1]) VALUES ('{}', '{3,4}', '{foo,bar}', '{bar,foo}'); SELECT * FROM arrtest; - a | b | c | d | e | f | g --------------+-----------------+---------------+-------------------+---------------+-------------------+----------------- - {1,2,3,4,5} | {{{0,0},{1,2}}} | {} | {} | | {} | {} - {11,12,23} | {{3,4},{4,5}} | {"foobar"} | {{"elt1","elt2"}} | {"3.4","6.7"} | {"abc ","abcde"} | {"abc","abcde"} - {} | {3,4} | {"foo","bar"} | {"bar","foo"} | | | + a | b | c | d | e | f | g +-------------+-----------------+-----------+---------------+-----------+-----------------+------------- + {1,2,3,4,5} | {{{0,0},{1,2}}} | {} | {} | | {} | {} + {11,12,23} | {{3,4},{4,5}} | {foobar} | {{elt1,elt2}} | {3.4,6.7} | {"abc ",abcde} | {abc,abcde} + {} | {3,4} | {foo,bar} | {bar,foo} | | | (3 rows) SELECT arrtest.a[1], @@ -62,11 +62,11 @@ SELECT a[1:3], c[1:2], d[1:1][1:2] FROM arrtest; - a | b | c | d -------------+-----------------+---------------+------------------- - {1,2,3} | {{{0,0},{1,2}}} | | - {11,12,23} | | {"foobar"} | {{"elt1","elt2"}} - | | {"foo","bar"} | + a | b | c | d +------------+-----------------+-----------+--------------- + {1,2,3} | {{{0,0},{1,2}}} | | + {11,12,23} | | {foobar} | {{elt1,elt2}} + | | {foo,bar} | (3 rows) SELECT array_dims(a) AS a,array_dims(b) AS b,array_dims(c) AS c @@ -98,11 +98,11 @@ UPDATE arrtest SET c[2:2] = '{"new_word"}' WHERE array_dims(c) is not null; SELECT a,b,c FROM arrtest; - a | b | c ----------------+-----------------------+----------------------- + a | b | c +---------------+-----------------------+------------------- {16,25,3,4,5} | {{{113,142},{1,147}}} | {} - {} | {3,4} | {"foo","new_word"} - {16,25,23} | {{3,4},{4,5}} | {"foobar","new_word"} + {} | {3,4} | {foo,new_word} + {16,25,23} | {{3,4},{4,5}} | {foobar,new_word} (3 rows) SELECT a[1:3], @@ -110,10 +110,10 @@ SELECT a[1:3], c[1:2], d[1:1][2:2] FROM arrtest; - a | b | c | d -------------+-----------------------+-----------------------+------------ - {16,25,3} | {{{113,142},{1,147}}} | | - | | {"foo","new_word"} | - {16,25,23} | | {"foobar","new_word"} | {{"elt2"}} + a | b | c | d +------------+-----------------------+-------------------+---------- + {16,25,3} | {{{113,142},{1,147}}} | | + | | {foo,new_word} | + {16,25,23} | | {foobar,new_word} | {{elt2}} (3 rows) |
