Re: Review: query result history in psql

From: Maciej Gajewski <maciej(dot)gajewski0(at)gmail(dot)com>
To: Ian Link <ian(at)ilink(dot)io>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: query result history in psql
Date: 2013-07-02 09:53:39
Message-ID: CAEcSYXKzUgOTHFj1L0e=n95nY2Mo_ExgseYXFngrgJshwark0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The query history is stored within the client, so once the user stops
the client, it is gone. But yes, it would be useful to have some tool
that would allow you to see what's in there.

I could be a command (\showans ?) that would list all :ansXXX
variables, together with the query text and the size of the answer.
It would probably look ugly for very long queries, but could be useful
anyway.

I'm not sure if I'll be able to implement this feature any time soon,
as I'm very busy at the moment and going for a business trip in few
days.

In the meantime, I've applied your suggestions and moved the
sting-manipulating functions to stringutils. Also fixed a tiny bug.
Patch attached.

M

Attachment Content-Type Size
psql-ans.3.diff application/octet-stream 16.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2013-07-02 10:33:08 Re: pgsql_tmp and external sort
Previous Message Jeevan Chalke 2013-07-02 09:48:31 Re: checking variadic "any" argument in parser - should be array