Thread: Results messages in "results output" window
Dear friends,<br /><br /> I've been using PgAdmin 12.0.0 released on Jan 6, 2015, compiled in my Ubuntu 14.04 x64.<br />Nothing noticiable in terms of use (actually, there are few known bugs, but they don't bug me anyway).<br /><br /> I wouldlike to know if there is any change to enable processing results to appear in Results output window when running a scriptthe this one:<br /><br /> begin transaction;<br /> update mytable set factor_xy = 10 where factor_xy = 15 and nature_id= 4;<br /> commit transaction;<br /><br /> Today I get the following output:<br /><br /> [QUERY ] begin transaction<br/> [QUERY ] update mytable set factor_xy = 10 where factor_xy = 15 and nature_id = 4<br /> [QUERY ] rollbacktransaction<br /><br /> I would like to get something like:<br /><br /> [QUERY ] begin transaction<br /><b>0 rowschanged.</b><br /> [QUERY ] update mytable set factor_xy = 10 where factor_xy = 15 and nature_id = 4<br /><b>16 rowschanged.</b><br /> [QUERY ] rollback transaction<br /><b>0 rows changed.</b><br /><br /><br /> Is there any configurationI can change to get this?<br /><pre class="moz-signature" cols="72">-- Atenciosamente, Edson Carlos Ericksson Richter</pre>
<p dir="ltr">Le 13 févr. 2015 18:39, "Edson Richter" <<a href="mailto:edsonrichter@hotmail.com">edsonrichter@hotmail.com</a>>a écrit :<br /> ><br /> > Dear friends,<br />><br /> > I've been using PgAdmin 12.0.0 released on Jan 6, 2015, compiled in my Ubuntu 14.04 x64.<br /> > Nothingnoticiable in terms of use (actually, there are few known bugs, but they don't bug me anyway).<br /> ><br /> >I would like to know if there is any change to enable processing results to appear in Results output window when runninga script the this one:<br /> ><br /> > begin transaction;<br /> > update mytable set factor_xy = 10 wherefactor_xy = 15 and nature_id = 4;<br /> > commit transaction;<br /> ><br /> > Today I get the following output:<br/> ><br /> > [QUERY ] begin transaction<br /> > [QUERY ] update mytable set factor_xy = 10 wherefactor_xy = 15 and nature_id = 4<br /> > [QUERY ] rollback transaction<br /> ><br /> > I would like to getsomething like:<br /> ><br /> > [QUERY ] begin transaction<br /> > 0 rows changed.<br /> > [QUERY ]update mytable set factor_xy = 10 where factor_xy = 15 and nature_id = 4<br /> > 16 rows changed.<br /> > [QUERY ] rollback transaction<br /> > 0 rows changed.<br /> ><br /> ><br /> > Is there any configuration Ican change to get this?<br /> ><p dir="ltr">Nope. There's nothing for this.
<div class="moz-cite-prefix">On 13-02-2015 15:46, Guillaume Lelarge wrote:<br /></div><blockquote cite="mid:CAECtzeUGi5=YykwLO3_MVrzUUiGfY-Op1LmTUd7OQC3Vd+fVng@mail.gmail.com"type="cite"><p dir="ltr">Le 13 févr. 2015 18:39,"Edson Richter" <<a href="mailto:edsonrichter@hotmail.com" moz-do-not-send="true">edsonrichter@hotmail.com</a>>a écrit :<br /> ><br /> > Dear friends,<br /> ><br /> >I've been using PgAdmin 12.0.0 released on Jan 6, 2015, compiled in my Ubuntu 14.04 x64.<br /> > Nothing noticiablein terms of use (actually, there are few known bugs, but they don't bug me anyway).<br /> ><br /> > I wouldlike to know if there is any change to enable processing results to appear in Results output window when running a scriptthe this one:<br /> ><br /> > begin transaction;<br /> > update mytable set factor_xy = 10 where factor_xy= 15 and nature_id = 4;<br /> > commit transaction;<br /> ><br /> > Today I get the following output:<br/> ><br /> > [QUERY ] begin transaction<br /> > [QUERY ] update mytable set factor_xy = 10 wherefactor_xy = 15 and nature_id = 4<br /> > [QUERY ] rollback transaction<br /> ><br /> > I would like to getsomething like:<br /> ><br /> > [QUERY ] begin transaction<br /> > 0 rows changed.<br /> > [QUERY ]update mytable set factor_xy = 10 where factor_xy = 15 and nature_id = 4<br /> > 16 rows changed.<br /> > [QUERY ] rollback transaction<br /> > 0 rows changed.<br /> ><br /> ><br /> > Is there any configuration Ican change to get this?<br /> ><p dir="ltr">Nope. There's nothing for this.</blockquote> Ok, I see. So, results windowis almost useless when running scripts...<br /> Any tip on where to look if I can provide a patch for this?<br /><br/> Thanks,<br /><br /> Edson<br />
Hello Edson, Friday, February 13, 2015, 8:54:58 PM, you wrote: ER> On 13-02-2015 15:46, Guillaume Lelarge wrote: ER> Le 13 fevr. 2015 18:39, "Edson Richter" ER> <edsonrichter@hotmail.com> a ecrit :>>>> Dear friends,>>>> I've been using PgAdmin 12.0.0 released on Jan 6, 2015, >> compiled in my Ubuntu 14.04 x64.>> Nothing noticiable in terms of use (actually, there are few >> known bugs,but they don't bug me anyway).>>>> I would like to know if there is any change to enable >> processing resultsto appear in Results output window when >> running a script the this one:>>>> begin transaction;>> update mytableset factor_xy = 10 where factor_xy = 15 and nature_id = 4;>> commit transaction;>>>> Today I get the followingoutput:>>>> [QUERY═══ ] begin transaction>> [QUERY═══ ] update mytable set factor_xy = 10 where >> factor_xy= 15 and nature_id = 4>> [QUERY═══ ] rollback transaction>>>> I would like to get something like:>>>> [QUERY═══] begin transaction>> 0 rows changed.>> [QUERY═══ ] update mytable set factor_xy = 10 where >> factor_xy =15 and nature_id = 4>> 16 rows changed.>> [QUERY═══ ] rollback transaction>> 0 rows changed.>>>>>> Is there any configurationI can change to get this?>> ER> Nope. There's nothing for this. ER> Ok, I see. So, results window is almost useless when running scripts... ER> Any tip on where to look if I can provide a patch for this? Hi! As far as I know, pgAdmin sends the whole query text to Postgres "as-is". Then, Postgres parses it and executes as a series of queries, returning output related to the last one. So, first of all pgAdmin should split the text into separate queries and perform them serially. Then it can append results to the output window (and probably render several result grids in a tabbed manner - cool!). How to parse query text and split it into separate queries? I hope that code related to pgScript feature will help. -- Best regards,J.F.
2015-02-13 19:09 GMT+01:00 J.F. Oster <jinfroster@mail.ru>:
Hello Edson,
Friday, February 13, 2015, 8:54:58 PM, you wrote:
ER> On 13-02-2015 15:46, Guillaume Lelarge wrote:
ER> Le 13 fevr. 2015 18:39, "Edson Richter"
ER> <edsonrichter@hotmail.com> a ecrit :ER> Nope. There's nothing for this.>>
>> Dear friends,
>>
>> I've been using PgAdmin 12.0.0 released on Jan 6, 2015,
>> compiled in my Ubuntu 14.04 x64.
>> Nothing noticiable in terms of use (actually, there are few
>> known bugs, but they don't bug me anyway).
>>
>> I would like to know if there is any change to enable
>> processing results to appear in Results output window when
>> running a script the this one:
>>
>> begin transaction;
>> update mytable set factor_xy = 10 where factor_xy = 15 and nature_id = 4;
>> commit transaction;
>>
>> Today I get the following output:
>>
>> [QUERY═══ ] begin transaction
>> [QUERY═══ ] update mytable set factor_xy = 10 where
>> factor_xy = 15 and nature_id = 4
>> [QUERY═══ ] rollback transaction
>>
>> I would like to get something like:
>>
>> [QUERY═══ ] begin transaction
>> 0 rows changed.
>> [QUERY═══ ] update mytable set factor_xy = 10 where
>> factor_xy = 15 and nature_id = 4
>> 16 rows changed.
>> [QUERY═══ ] rollback transaction
>> 0 rows changed.
>>
>>
>> Is there any configuration I can change to get this?
>>
ER> Ok, I see. So, results window is almost useless when running scripts...
ER> Any tip on where to look if I can provide a patch for this?
Hi! As far as I know, pgAdmin sends the whole query text to Postgres
"as-is". Then, Postgres parses it and executes as a series of queries,
returning output related to the last one. So, first of all pgAdmin
should split the text into separate queries and perform them serially.
Then it can append results to the output window (and probably
render several result grids in a tabbed manner - cool!).
Well, I have looked into the several result grids, and AFAIR, you don't need to split the queries to make it work. The main issue for this feature is a UI issue. (And then a time issue, as you need time to work on this.)
How to parse query text and split it into separate queries? I hope
that code related to pgScript feature will help.
Correct, but don't hold your breath.
--