Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executing create plpgsql function runs properly only if selecting the all function definition lines #1071

Open
kfirufk opened this issue Dec 28, 2022 · 1 comment
Labels

Comments

@kfirufk
Copy link

kfirufk commented Dec 28, 2022

I'm using vscode version 1.74.2 with SQLTools extension v0.26.0 On MacOS Monterey 12.6.2 in order to work with a postgresql 15 database.

when i'm writing a plpgsql function, the editor marks in color the function besides the last line of END $$ LANGUAGE plpgsql.

SQLTools provides the shortcut called SQLTools Connection: Run current query

i can't use it because i get unterminated quoted string error.

so when I try to execute the run current query shortcut i get the following error:

unterminated dollar-quoted string at or near "$$ BEGIN return query select 1::int;" at character 61
I created a sample code:

create or replace function foo() returns table(test int) as $$
BEGIN
  return query select 1::int;
END $$ LANGUAGE plpgsql;

of course if i manually mark all the 4 lines and then run the query it creates the function properly, but this is very annoying since this is an example and i deal with complex functions and to start marking all of them in order to execute them each time is a hassle.

@kfirufk kfirufk added the triage label Dec 28, 2022
@Wassim-Rached
Copy link

reply to my boi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants