Cannot Execute Function Blocks

I have the following function block:

DO $$
<<my_block>>
BEGIN
RAISE NOTICE ‘Hello, World!’;
END my_block$$;

This is valid syntax in pgAdmin4 and DataGrip, but I cannot execute this in Toad Edge. I get the following errors:

  • Syntax error, found: ‘<<’ at line 2, column 1. ERROR: line 2, column 1, ending line 2, column 2: Found ‘<<’: Expecting: BEGIN DECLARE

  • Syntax error, found: ‘my_block’ at line 5, column 5. ERROR: line 5, column 5, ending line 5, column 12: Found ‘my_block’: Expecting: ;

Hi, thank you for your feedback. We are investigating it.
We will update you with the progress.
br.Miroslav Stanik

Can you executed the query even there are syntax errors?
thanks
Miroslav Stanik

Greetings, Miroslav!

I cannot execute the query. I get the error “x”

Hi, yes, but it is syntax error mark (false positive), can you try to execute the query? there is Execute action in toolbar
m.

Hello Miroslav,

I tried to execute a function block that was supposed to output text, but it did not produce any output.

Hi, right now there is output only for “RAISE EXCEPTION” in Toad Edge in Error view.
Other log levels ( DEBUG , LOG , INFO , NOTICE , WARNING) are not supported yet, but we plan to add this feature in future.
br.
Miroslav Stanik

Hello,

Why is there a syntax error is being detected at the double left-caret symbols (“<<”) as the screen shot I sent you earlier shows?

The error is not occurring at the “RAISE NOTICE” statement.

Hi, it is false positive syntax error, caused by wrong parsing in our parser library.

br.
Miroslav Stanik

Greetings Miroslav,

Thank you for the update. A couple of questions:

  • Will the bug be fixed in the parser?

  • When will you support functionality for RAISE NOTICE?

Kelly

Hi, parser issue will be fixed in 2.0.5, RAISE NOTICE is under development, we will let you know.
br.
Miroslav Stanik