I'm new to using dbForge for PostgreSQL, and in general new to using PostgreSQL. So my question might have a simple solution.
Within a function, the logic is enclosed in two sets of $$-characters, rendering everything in between as a string - and therefore not susceptible for any code checking or code completion. This makes it hard to use the built-in tools that dbForge offers.
Is there a way around this, so that code within the $$-block is not regarded as a string?
Thanks
Writing Functions
Re: Writing Functions
This is a correct behavior since, in PostgreSQL, a procedure's body is a string constant https://www.postgresql.org/docs/11/sql- ... ction.html
In the editor of dbForge Studio 2019 for Postgre SQL, all string constants are red marked by default.
In order the Code Completion to work inside a string constant of a procedure's body, there is Dollar-Quoted $plpgsql$ in dbForge. In any other Dollar-Quoted, a procedure's body will be displayed as a normal string constant, i.e. with a red font by default.
In the editor of dbForge Studio 2019 for Postgre SQL, all string constants are red marked by default.
In order the Code Completion to work inside a string constant of a procedure's body, there is Dollar-Quoted $plpgsql$ in dbForge. In any other Dollar-Quoted, a procedure's body will be displayed as a normal string constant, i.e. with a red font by default.
Re: Writing Functions
Perfect!
$plpgsql$ does the trick.
Thanks
$plpgsql$ does the trick.
Thanks
Re: Writing Functions
Thank you for updating us on this issue.
Please let us know if any questions arise.
Please let us know if any questions arise.