× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
tariqrahiman reported 2015-05-14T20:43:25Z  · last modified 2015-06-18T16:13:53Z

PostgreSQL-specific substitute: Dollar-quoting


customer request
Priority Minor
Complexity Moderate
Component App - Options
Version 16.0
The dollar signs are used for "dollar quoting" and are in no way specific to function definitions. Dollar-quoting is a PostgreSQL-specific substitute for single quotes to avoid quoting issues inside the function body. Currently the "dollar quoting" variable used during the creation of the function is not stored in the system catalog tables.

Data Studio uses the system catalog tables to reverse engineer the function, so it does not know what "dollar quoting" variable that was used at function creation time and instead encapsulates the body in single quotes.

 

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 :

CREATE TABLE fi_email_templates(email_template_id    int4 NOT NULL,email_template_title varchar(255) NOT NULL, email_template_body  text NOT NULL,PRIMARY KEY(email_template_id))
GO
 
CREATE OR REPLACE FUNCTION check_phone_number(text)
  RETURNS boolean 
 LANGUAGE plpgsql STRICT IMMUTABLE AS $func$
BEGIN
select current_time;
select CAST(COALESCE(email_template_title, email_template_title,'') AS VARCHAR(128)) from  rs.fi_email_templates;
select version();
END;
$func$
1 attachment

Issue #13330

Closed
Fixed
Resolved 2015-05-18T17:54:44Z
 
 
Completion
No due date
Fixed Build v16.0.5-9
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017