You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> sqlparse.split('''CREATE OR REPLACE FUNCTION public.bug() RETURNS text
... LANGUAGE sql
... AS $func$
... select $string$ Run this query: SELECT 123; $string$::text;
... $func$;''')
[u'CREATE OR REPLACE FUNCTION public.bug() RETURNS text\nLANGUAGE sql\nAS $func$\nselect $string$ Run this query: SELECT 123;', u'$string$::text;\n$func$;']
It works as expected with regular quotes:
>>> sqlparse.split('''CREATE OR REPLACE FUNCTION public.bug() RETURNS text
... LANGUAGE sql
... AS $func$
... select ' Run this query: SELECT 123; '::text;
... $func$;''')
[u"CREATE OR REPLACE FUNCTION public.bug() RETURNS text\nLANGUAGE sql\nAS $func$\nselect ' Run this query: SELECT 123; '::text;\n$func$;"]
The text was updated successfully, but these errors were encountered:
>>> sqlparse.split('''CREATE OR REPLACE FUNCTION public.bug() RETURNS text
... LANGUAGE sql
... AS $func$
... select $string$ Run this query: SELECT 123; $string$::text;
... $func$;''')
['CREATE OR REPLACE FUNCTION public.bug() RETURNS text\nLANGUAGE sql\nAS $func$\nselect $string$ Run this query: SELECT 123; $string$::text;\n$func$;']
In the python console:
It works as expected with regular quotes:
The text was updated successfully, but these errors were encountered: