1

I often have to debug really complicated SQL queries that have placeholders / parameters like 1ドル, 2ドル, and 3ドル throughout them.

When I try to run such a query in pgadmin, I get:

ERROR: there is no parameter 1ドル

LINE 30: WHERE r.predecessor_account_id = 1ドル

If I try to run the query in PSequel, I get:

The # of binded parameters < the # of parameter markers

In code, I'm using https://www.npmjs.com/package/pg to handle the parameters.

What GUIs exist to allow me to paste a long parameterized Postgres query and then type in some parameters (in fields, not by editing anything in the query) and run the query?

asked Oct 4, 2022 at 19:55
3
  • That sounds like a perfect use case for the generic_plan extension. Commented Oct 5, 2022 at 2:53
  • @user_0 Thank you! If you write this as an answer, I'd accept it. It seems that I can paste my query as-is into Dbeaver and then press the Play button that has a green plus next to it (a right-pointing triangle and green +), and then it prompts me to provide values for each numbered variable. Great! Commented Oct 6, 2022 at 13:33
  • Ok :) Done as answer! I abandoned PGAdmin since they jumped on Phyton with version 4.. Commented Oct 6, 2022 at 13:47

1 Answer 1

1

I think Dbeaver can fit your case. Also is pretty customizable:

https://stackoverflow.com/questions/56566119/dbeaver-how-to-declare-variables-and-use-them

answered Oct 6, 2022 at 13:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.