diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2016-08-13 17:38:21 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2016-08-13 17:38:21 +0200 |
| commit | 2893bd1857d685cf892beac3a7429d03cf1a09f1 (patch) | |
| tree | 1fc1a427841391137820355f33cdaac119c080b6 /tests/files/function_psql4.sql | |
| parent | b7a30d04427e4e4cbc66d08b780ffbb23ab44931 (diff) | |
| download | sqlparse-2893bd1857d685cf892beac3a7429d03cf1a09f1.tar.gz | |
Parse double dollars (PostgreSQL) as literal strings (fixes #277).
Diffstat (limited to 'tests/files/function_psql4.sql')
| -rw-r--r-- | tests/files/function_psql4.sql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/files/function_psql4.sql b/tests/files/function_psql4.sql new file mode 100644 index 0000000..02900a6 --- /dev/null +++ b/tests/files/function_psql4.sql @@ -0,0 +1,12 @@ +CREATE FUNCTION doubledollarinbody(var1 text) RETURNS text +/* see issue277 */ +LANGUAGE plpgsql +AS $_$ +DECLARE + str text; + BEGIN + str = $$'foo'$$||var1; + execute 'select '||str into str; + return str; + END +$_$; |
