Start a new topic
Solved

psql commands support/ support for \ as single line comment identifier

Hej


I would appreciate if DbVis supported psql commands or at least ignored them. I tried to make DbVis treat as comments, but while the syntax highlighting is good, the exection seems to fail.


Varma hälsningar


Thiemo


image



Hi Thiemo,


Can you please post an example SQL? Have you tried enabling the new Allow SQL Dialects in Tool Properties under the General / SQL Commander / Statement Delimiters?


Regards


Roger

Hei Roger


I tried the dialect option, but it did not work out.


Code snippet:


\echo Start
create or replace view CROP_PLANT_DENORMALISED as
           select P.GENUS,
                  P.EPITHET_SPECIES,
                  P.EP...


Error

[Code: 0, SQL State: 42601]  ERROR: syntax error at or near "\"
  Position: 1  [Script position: 340 - 345]


Varma hälsningar


Thiemo

Hi Thiemo,


By default DbVisualizer sends comments to the database when executing. When setting Single Line Identifier 2 to \ have you also set Strip Comments when Executing as indicated in the screenshot below?



Kind Regards 


Ulf

Hej Ulf


Thanks for the hint. I forgot about that option. My comment workaround works now.


Varma hälsningar


Thiemo

Hi Thiemo


Great!


Kind Regards 


Ulf

Login or Signup to post a comment