question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Postgresql text between $$ looks like comment

See original GitHub issue

System information:

  • Windows 7 x64 Professional
  • DBeaver 6.2.4.2019110311605
  • No additional extensions

Connection specification:

  • PostgreSQL 9.5.13
  • Driver org.postgresql:postgresql:RELEASE[9.4.1212.jre7]
  • No tunnels or proxies

Describe the problem you’re observing:

In DBeaver 6.2.3 was problem with executing anonymous code block ($$). When trying to execute the request, an error occurred and the code looked commented out. In dbeaver 6.2.4 there is no problem with execution, but the code is periodically highlighted as commented.

Steps to reproduce, if exist:

Copy query below (ctrl+v) into query editor - part of query highlighted as commented. Type query below and move it in query editor down by pressing Enter before “DO”

DO $$
BEGIN
	RAISE NOTICE '%', 'Test';
END $$;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
serge-ridercommented, Dec 16, 2019

image

1reaction
serge-ridercommented, Dec 17, 2019

We may have two different options.

  • Treat $$ as string quote (enabled by default)
  • Treat $name$ as string quote (disabled by default)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: COMMENT - PostgreSQL
COMMENT stores a comment about a database object. Only one comment string is stored for each object, so to modify a comment, issue...
Read more >
PostgreSQL: Comments within SQL - TechOnTheNet
In PostgreSQL, a comment started with -- symbol is similar to a comment starting with # symbol. When using the -- symbol, the...
Read more >
Postgresql 9: substring with regex to get string between string ...
1. Try using HELLO: ([^|]+) , like SELECT SUBSTRING(myField from 'HELLO: ([^|]+)') AS test FROM myTable · Perfect! Thanks a lot!!! · Your...
Read more >
postgresql - Find substrings within between 2 string fragments
Use substring() with a regular expression instead: substring(ls.attribute_actions_text FROM 'name="(.*?)"/>'). The dot ( . ) ...
Read more >
PostgreSQL SUBSTRING() function - w3resource
The following PostgreSQL statement returns 5 characters starting from the 4th position from the string 'w3resource', that is 'esour'. Code:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found