Re: Review: query result history in psql

From: ian link <ian(at)ilink(dot)io>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Maciej Gajewski <maciej(dot)gajewski0(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: query result history in psql
Date: 2013-07-01 07:19:15
Message-ID: CAOOwM5K+8=2=ANsGeAHi5hWB_meD9OspV_1Y-6ATc9AkLvdcdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> but maybe some interactive mode should be usefull - so after
> execution, and showing result, will be prompt if result should be
> saved or not.

I like the idea, in addition to the ordinary mode. Personally, I would use
the ordinary mode, but I can see how 'interactive' would be useful.

yes, the names :ans01, :ans02, ... miss semantics - How I can join

this name (and content) with some SQL query?

That makes sense. I think having part of / the whole query string would be
very helpful. Great suggestion!

Maciej, would you be able/have time to implement these? Or do you need any
help getting them done?

On Sun, Jun 30, 2013 at 11:35 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>wrote:

> Hello
>
> 2013/7/1 ian link <ian(at)ilink(dot)io>:
> > Not sure about all of your suggestions. Let me see if I can clarify what
> > you're looking for.
> >
> >>
> >> * simply decision if content should be stored in history or not,
> >
> > Do you mean that the user should use a flag to place the result of a
> query
> > into the history?
> > like:
> > --ans SELECT * FROM cities...
> > Not sure if that's what you mean, but it seems kind of unnecesary. They
> can
> > just hit the \ans flag beforehand.
>
> switching off on is not user friendly
>
> but maybe some interactive mode should be usefull - so after
> execution, and showing result, will be prompt if result should be
> saved or not.
>
> some like:
>
> \ans interactive
> > SELECT * FROM pg_proc;
>
> **** result ****
>
> should be saved last result [y, n]?
> > y
> result is saved in :ans22
>
> >
>
>
> >
> >> * simply remove last entry (table) of history
> >
> > That could be useful. What do you think Maciej?
>
> yes, lot of queries is just +/- experiment and you don't would store result
>
> >
> >> * queries should be joined to content, only name is not enough
> >
> > Don't know what you mean. Could you try re-wording that?
> >
>
> yes, the names :ans01, :ans02, ... miss semantics - How I can join
> this name (and content) with some SQL query?
>
> I needs to reverese search in SQL of stored caches, and I need a
> information
>
> ans01 SELECT * FROM pg_proc
> ans02 SELECT * FROM ans02 WHERE ...
> ans03 ...
>
> Regards
>
> Pavel
>
> > Ian
> >
> >
> >
> > On Fri, Jun 28, 2013 at 8:49 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> > wrote:
> >>
> >> Hello
> >>
> >> I am not sure, this interface is really user friendly
> >>
> >> there is not possible "searching" in history, and not every query push
> >> to history some interesting content.
> >>
> >> It require:
> >>
> >> * simply decision if content should be stored in history or not,
> >> * simply remove last entry (table) of history
> >> * queries should be joined to content, only name is not enough
> >>
> >> Regards
> >>
> >> Pavel
> >>
> >> 2013/6/28 Maciej Gajewski <maciej(dot)gajewski0(at)gmail(dot)com>:
> >> > Thanks for checking the patch!
> >> >
> >> > So what's left to fix?
> >> > * Moving the escaping-related functions to separate module,
> >> > * applying your corrections.
> >> >
> >> > Did I missed anything?
> >> >
> >> > I'll submit corrected patch after the weekend.
> >> >
> >> > M
> >> >
> >
> >
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2013-07-01 07:19:55 Re: Department of Redundancy Department: makeNode(FuncCall) division
Previous Message Satoshi Nagayasu 2013-07-01 07:10:39 Re: Block write statistics WIP