Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run - Mailing list pgadmin-support

From richard coleman
Subject Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
Date
Msg-id CAGA3vBsuzCxOb-VKMFX=0EXWiqU3B0eqhSzhxkkcuuaOzs1sVQ@mail.gmail.com
Whole thread Raw
In response to Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run  (Jack Royal-Gordon <jackrg@pobox.com>)
List pgadmin-support
Jack, 

It's fine as it is once you get used to it.  For more involved or complicated queries I use another tool that gives me the option to either:
"Run Script", which runs the entire query window
"Run Statement", which has the benefit of running the selected text OR (and this is the part I really like) the statement that your cursor is currently on, even if nothing is selected.
When I am developing complicated multi statement queries and only want to test or run a single statement, I don't even have to select anything. ;)

I am finding that pgAdmin4 is a good tool for quick and dirty work with the database, but this other tool is much more feature rich and so better for doing more complicated work.

rik.




On Wed, Aug 12, 2020 at 3:43 PM Jack Royal-Gordon <jackrg@pobox.com> wrote:
I don’t know if it’s even a good idea to change that functionality. When I’m working on performance issues, I very well may put a very complicated SQL statement with several sub-selects in the window, and start with just one of the sub-selects to see what it’s performance issues might be. So it’s not unusual to select a piece of a statement and execute it.

The behavior described by Tung Do is really just a learning step.

On Aug 12, 2020, at 12:36 PM, richard coleman <rcoleman.ascentgl@gmail.com> wrote:

That's not a bug, it's a *feature* !!

Seriously though, presently the query window in pgAdmin4 has two options:
If nothing is selected -> run the entire window
If something is selected -> run just what's selected.

That's how it's been since, well as long as I can recall.  Unlike some other tools, pgAdmin4 lacks the ability to "Run Selected" vs. "Run Entire Query Window", so it implements the previously mentioned logic.

So I guess what you should probably do is create a *feature* request for this additional functionality.

rik.

On Wed, Aug 12, 2020 at 3:18 PM Trung Do <chin.bimbo@gmail.com> wrote:
If I enter a well formed SQL query into the Query Editor, but only
select a portion of the query with the mouse and try to run, pgAdmin
will try to run the selected portion as the query (and will fail most
of the time because of syntax error)



pgadmin-support by date:

Previous
From: Trung Do
Date:
Subject: Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
Next
From: Calle Hedberg
Date:
Subject: Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run