Re: Unable to download macros query results (reference #RM5965)

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Rahul Shirsat <rahul(dot)shirsat(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Unable to download macros query results (reference #RM5965)
Date: 2020-11-26 13:26:02
Message-ID: CA+OCxozDMADKo7p332SOdpmgk7jEMsXnheZB=eMCfJ94hoP8ZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Thu, Nov 26, 2020 at 1:18 PM Rahul Shirsat <
rahul(dot)shirsat(at)enterprisedb(dot)com> wrote:

> Hi Team,
>
> Users are unable to download macros query results.
>
> *Lets look out how download query result button works:*
>
> For pgadmin4, always downloads the latest query result when the user makes
> n-number of sql changes in the query tool, no need to execute, download
> takes care of it. Does not work with macros as query is needed in the query
> tool, which macros does not provide (While feature implementation, it was
> decided that macros query won't be added to the query tool, as users may
> lose any important queries in it).
>
> In pgadmin3, always the last executed query result gets downloaded even if
> the user makes n-number of sql changes in the query tool. Works with
> macros. For the latest query change results, the user has to first execute
> before every download.
>
> For Macros, with the pgadmin4 approach, even if we implement a download
> option, it would be difficult to decide whether to download the already ran
> macros or to download the query result present in the query tool.
>
> Please suggest.
>

I've not been happy with that for a while. The button is marked as a
download button, however, it's really "Execute and save results". That's
quite different, and could result (as at least some users have found), the
file containing different data from what's shown in the grid from a normal
execution of the query.

I think we should make it a "Save results to file" button, and clarify the
behaviour (through docs, and only enabling button when there are results to
save). It should *not* execute a query, but simply save what is currently
in the grid. The only caveat I would note is that if the grid isn't fully
populated, it should do so first (the same as we do if you select all rows).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2020-11-26 13:27:06 Re: SameSite issues in Safari Browser (reference #RM5975)
Previous Message Rahul Shirsat 2020-11-26 13:17:56 Unable to download macros query results (reference #RM5965)