Thread: Bug report: pgAdmin takes selected portion of query in Query Editor to run
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)
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
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)
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
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 windowIf 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)
I see, thanks for the explanation. It's a strange feature then, since I accidentally selected part of the query and was so puzzled at the cryptic error message that followed. And having an error is actually the best case scenario. I can see someone doing copy/paste operations to/from this query editor, somehow have part of the query selected but that part is valid SQL, then run it and have no idea that it's not running the whole thing. Being sneaky around something that deals with data is IMO not a good thing. I think it's better if that's an opt-in behavior instead. Just my 2c. On Wed, 12 Aug 2020 at 15:36, 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 "RunSelected" 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) >> >>
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
"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.
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 windowIf 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)
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
I see, thanks for the explanation. It's a strange feature then, since
I accidentally selected part of the query and was so puzzled at the
cryptic error message that followed. And having an error is actually
the best case scenario. I can see someone doing copy/paste operations
to/from this query editor, somehow have part of the query selected but
that part is valid SQL, then run it and have no idea that it's not
running the whole thing. Being sneaky around something that deals with
data is IMO not a good thing. I think it's better if that's an opt-in
behavior instead. Just my 2c.
On Wed, 12 Aug 2020 at 15:36, 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)
>>
>>
HISP
Researcher & Technical Specialist
Health Information Systems Programme – South Africa
Cell: +47 41461011 (Norway)
Iridium SatPhone: +8816-315-19119 (usually OFF)
E-mail1: calle@hisp.org
E-mail2: calle.hedberg@gmail.com
Skype: calle_hedberg
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
HiI find that a nice feature... But if I may ask a related question that baffles me: If I paste multiple queries into a window and then run all of them, they all run BUT the output window only show the last sub-query result.Is there a configuration setting that will concatenate output when running such sequential queries in one go?RegardsCalleOn Wed, 12 Aug 2020 at 22:53, Trung Do <chin.bimbo@gmail.com> wrote:I see, thanks for the explanation. It's a strange feature then, since
I accidentally selected part of the query and was so puzzled at the
cryptic error message that followed. And having an error is actually
the best case scenario. I can see someone doing copy/paste operations
to/from this query editor, somehow have part of the query selected but
that part is valid SQL, then run it and have no idea that it's not
running the whole thing. Being sneaky around something that deals with
data is IMO not a good thing. I think it's better if that's an opt-in
behavior instead. Just my 2c.
On Wed, 12 Aug 2020 at 15:36, 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)
>>
>>--HISP
Researcher & Technical Specialist
Health Information Systems Programme – South Africa
Cell: +47 41461011 (Norway)
Iridium SatPhone: +8816-315-19119 (usually OFF)
E-mail1: calle@hisp.org
E-mail2: calle.hedberg@gmail.com
Skype: calle_hedberg
Re: Bug report: pgAdmin takes selected portion of query in Query Editor to run
On Thu, Aug 13, 2020 at 4:59 AM Calle Hedberg <calle.hedberg@gmail.com> wrote:HiI find that a nice feature... But if I may ask a related question that baffles me: If I paste multiple queries into a window and then run all of them, they all run BUT the output window only show the last sub-query result.Is there a configuration setting that will concatenate output when running such sequential queries in one go?RegardsCalleOn Wed, 12 Aug 2020 at 22:53, Trung Do <chin.bimbo@gmail.com> wrote:I see, thanks for the explanation. It's a strange feature then, since
I accidentally selected part of the query and was so puzzled at the
cryptic error message that followed. And having an error is actually
the best case scenario. I can see someone doing copy/paste operations
to/from this query editor, somehow have part of the query selected but
that part is valid SQL, then run it and have no idea that it's not
running the whole thing. Being sneaky around something that deals with
data is IMO not a good thing. I think it's better if that's an opt-in
behavior instead. Just my 2c.
On Wed, 12 Aug 2020 at 15:36, 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)
>>
>>--HISP
Researcher & Technical Specialist
Health Information Systems Programme – South Africa
Cell: +47 41461011 (Norway)
Iridium SatPhone: +8816-315-19119 (usually OFF)
E-mail1: calle@hisp.org
E-mail2: calle.hedberg@gmail.com
Skype: calle_hedberg
--Thanks,Aditya ToshniwalpgAdmin hacker | Sr. Software Engineer | edbpostgres.com"Don't Complain about Heat, Plant a TREE"
HISP
Researcher & Technical Specialist
Health Information Systems Programme – South Africa
Cell: +47 41461011 (Norway)
Iridium SatPhone: +8816-315-19119 (usually OFF)
E-mail1: calle@hisp.org
E-mail2: calle.hedberg@gmail.com
Skype: calle_hedberg