Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
With thanks to bar for the great idea, this feature request to implement $$ syntax markers in the mysql client (and mysqltest), which would avoid the need for any delimiter inside them. This would allow single-line CREATE PROCEDURE statements (very handy for QA and MTR tests etc.) and other goodies like not having to change delimiters, being able to insert binary data directly, etc.
CREATE PROCEDURE p() $$ BEGIN; BEGIN; SELECT 1; END; END; $$;
|
SELECT $$ some_binary_data $$;
|
etc.
PostgreSQL also has something like this in $$ (as does Bash from memory, with a different syntax):
https://www.postgresonline.com/journal/archives/376-Dollar-quoting-for-escaping-single-quotes.html
https://www.postgresql.org/docs/current/plpgsql-development-tips.html#PLPGSQL-QUOTE-TIPS