summaryrefslogtreecommitdiff
path: root/tests/files/function_psql4.sql
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2016-08-13 17:38:21 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2016-08-13 17:38:21 +0200
commit2893bd1857d685cf892beac3a7429d03cf1a09f1 (patch)
tree1fc1a427841391137820355f33cdaac119c080b6 /tests/files/function_psql4.sql
parentb7a30d04427e4e4cbc66d08b780ffbb23ab44931 (diff)
downloadsqlparse-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.sql12
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
+$_$;