Add an option under file -> Options -> scripts -> postgresql -> [Dollar Quoting] and then use this for quoting procedural bodies if the user sets it, other wise use a single quote as we currently do.
Sample Scripts to reproduce :
A new option has been added under Help -> Options -> Scripts -> PostgreSQL -> [Dollar Quoting Value].
a.) If this left empty, the value used is a single quote and function/procedure body extraction escapes any single quotes and the body is encapsulated within single quotes in scripting.
b.) option name is given. If the option name does not have a $ at beginning or ending of string the $ char will be added to the option value. If this option is set to anything other then a single quote, the body will not escape single quotes in the function/procedure body. if the value is set to ' then no $ characters are added to the value.
The value is global to postgresql connections. Would this be helpful to add the option to specific connections so that the user could have a connection that uses $BODY$ and a different connection that uses $MYQUOTEVALUE$. This could be done to override the global value. just a thought...
1. Can you change the text description and make it more user friendly ? Users might find it a little confusing..
I didn't know what to enter in this option. What happens if i enter anything other than a $ ? like @ ?
1. Can you change the text description and make it more user friendly ? Users might find it a little confusing..
I didn't know what to enter in this option. What happens if i enter anything other than a $ ? like @ ?
$ substitution and scripting is working in 16.0.5-8
$ substitution and scripting is working in 16.0.5-8
made changes to description & fixed single '$' entry to convert to double $$
made changes to description & fixed single '$' entry to convert to double $$
Issue #13330 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v16.0.5-9 |
No time estimate |
A new option has been added under Help -> Options -> Scripts -> PostgreSQL -> [Dollar Quoting Value].
a.) If this left empty, the value used is a single quote and function/procedure body extraction escapes any single quotes and the body is encapsulated within single quotes in scripting.
b.) option name is given. If the option name does not have a $ at beginning or ending of string the $ char will be added to the option value. If this option is set to anything other then a single quote, the body will not escape single quotes in the function/procedure body. if the value is set to ' then no $ characters are added to the value.
The value is global to postgresql connections. Would this be helpful to add the option to specific connections so that the user could have a connection that uses $BODY$ and a different connection that uses $MYQUOTEVALUE$. This could be done to override the global value. just a thought...