dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
40.6k stars 3.5k forks source link

Wrong checking syntax in "create or replace function" script #35982

Open zMotoR opened 1 month ago

zMotoR commented 1 month ago

Description

If we use "create function" in a script then syntax checking works great in PostgreSQL. But if we write "create or replace function" syntax checking is wrong, look at the pictures. pic1 pic2

DBeaver Version

Community Edition 24.2.2.202410061621

Operating System

Windows 11

Database and driver

Server: PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit Driver: PostgreSQL JDBC Driver 42.7.2

Steps to reproduce

  1. Connect to the PostgreSQL server (you can use docker image);
  2. Create script (you can use any database or schema):

create or replace function dup( in int, out f1 int, out f2 text ) as $$ select $1, cast($1 as text) || ' is text' $$ language sql; pic3

Additional context

No response

E1izabeth commented 1 month ago

Thanks for the bug report.