Re: Results messages in "results output" window

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru>
Cc: Edson Richter <edsonrichter(at)hotmail(dot)com>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Results messages in "results output" window
Date: 2015-02-13 21:02:41
Message-ID: CAECtzeWH1s6sea_-bYAxaPE0dpaTKjo8y5BL+uDymCyjuPm4PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

2015-02-13 19:09 GMT+01:00 J.F. Oster <jinfroster(at)mail(dot)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(at)hotmail(dot)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 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> 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!).
>
>
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.

--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Albe Laurenz 2015-02-18 13:58:40 REFRESH MATERIALIZED VIEW blocks pgAdmin III login
Previous Message J.F. Oster 2015-02-13 18:09:01 Re: Results messages in "results output" window