vscode-database-client
vscode-database-client copied to clipboard
[BUG] Postgres variables
trafficstars
I'm trying to use variables in postgres
DO $$
DECLARE
counter INTEGER := 1;
first_name VARCHAR(50) := 'John';
last_name VARCHAR(50) := 'Doe';
payment NUMERIC(11,2) := 20.5;
BEGIN
RAISE NOTICE '% % % has been paid % USD', counter, first_name, last_name, payment;
END $$;
error:
SQL: DO $$ DECLARE counter INTEGER := 1
unterminated dollar-quoted string at or near "$$ DECLARE counter INTEGER := 1"
- OS: Linux Ubunto
- Database Type: PostgresSql
Hi, if you run all SQL it can run successfully, the program can't detect all SQL statements yet.

Hi, I have released version 5.7.6, which supports do syntax.
Thanks 🙏