summaryrefslogtreecommitdiff
path: root/sql/orig.sql
blob: 7dad00ec3ca7287ce4417d290cea2b49ac02cb10 (plain)
1
2
3
4
5
6
7
8
9
10

/* Make sure creating an array literal and subscripting
 * preserves the original string exactly
 * (except for trimming surrounding whitespace). */
SELECT bool_and(btrim(before, E'\t\n\r ') = after) FROM (
	SELECT
		string AS before,
		json_path(('  [ ' || string || '  ] ')::json, '$.[0]')::text AS after
	FROM valid_test_strings
) AS subquery;