Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiHHx-0002OY-Ev for pgadmin-hackers@arkaria.postgresql.org; Thu, 26 Nov 2020 13:26:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kiHHv-0001hO-2z for pgadmin-hackers@arkaria.postgresql.org; Thu, 26 Nov 2020 13:26:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kiHHu-0001hH-Ts for pgadmin-hackers@lists.postgresql.org; Thu, 26 Nov 2020 13:26:18 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kiHHr-0005OL-Q3 for pgadmin-hackers@postgresql.org; Thu, 26 Nov 2020 13:26:18 +0000 Received: by mail-ed1-x534.google.com with SMTP id u19so949029edx.2 for ; Thu, 26 Nov 2020 05:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YPIu5pSN7XV5CyDkYE2XL0d1WJuhOhtLIvUDuRU1Cp4=; b=gqBUvq/h3hjF5TbSk2MbKfI9zm2mxVB+lTF/2w/lq3dwRqtlCoGznyoae5HkZ++Zij iGtkEHfNwIRIDcWh3hoRVqqczS+ArvAwQ/5fdCnPJo/cfgNR3YN80jNBF6r+ZJgp32Lf 8r34bfZqU0q1eqkbKEGcn4SsxwikPaUd0O5aLgf22MtfxBhnowyoTARzkkXMqGyb59SC s9buIWRonwmIUnfnRRyiw6+gFxnbZLRE3+I9o7v40YhHkDIbJLI0GVdFJbv21LGmZ44j 0qiB9KfRJg5PcgRrXY+ZPq7hf4Q15U1sT1cOxWTcAhPiUL6LkCGoM4yS4czo6YE9ANPS wOmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YPIu5pSN7XV5CyDkYE2XL0d1WJuhOhtLIvUDuRU1Cp4=; b=M9yxxyM2d1jmv8v3U1fAjY90k3sW5oGcQ0txWIxa445j3fCLQExnnYuxWh5zoMAWaO l1jB3CCFUaxYExFFeTaKqy+fob1qypbV0MIh+YW3Cuy5vVG/s0c+tnRJBCopvTfzOT0h b/i1oGJVeXoGXFBmdaN0G+n5+Evh9yHVi8wenfGcxQI5pWU5AUeiCK6NwOBglRVhfiy7 AWzbZDyyIVSRnG+tUa3ad1Mso0xz5AghgDOiHmtyh8aab7YjIzuBeN387IoAPrSM3JxO kNx1E3xum32CUc/WsmidMREvdl+6adTMvKV2y0TdhkJpx/hmh8ERrRgRtLkRzLMgdwaK 62Ug== X-Gm-Message-State: AOAM533yVHVz4t+4Ak6pV3rcK2pR0UW49uPC/TCZ+Zw4TDgw+7hjNiyU 1upnTXPWiEfwYoCJ6WDKHj/T+IXIoZDs7e6PrJy0eA== X-Google-Smtp-Source: ABdhPJxGzPMMM0Yp2gghHijNyHFAhQSlf+una2dlSZVFUB5gCSVbPMJHe17FSKHJ9zYJMMjniQotR/DDON6Mnyj25B4= X-Received: by 2002:a05:6402:1350:: with SMTP id y16mr2426914edw.360.1606397173005; Thu, 26 Nov 2020 05:26:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Thu, 26 Nov 2020 13:26:02 +0000 Message-ID: Subject: Re: Unable to download macros query results (reference #RM5965) To: Rahul Shirsat Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000dda3b705b5027c5f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000dda3b705b5027c5f Content-Type: text/plain; charset="UTF-8" Hi On Thu, Nov 26, 2020 at 1:18 PM Rahul Shirsat < rahul.shirsat@enterprisedb.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 --000000000000dda3b705b5027c5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Thu, Nov 26, 2020 at 1:18 PM Rahul S= hirsat <rahul.shirsat@= enterprisedb.com> wrote:
Hi Team,

Users are unab= le to download macros query results.

Lets lo= ok out how download query result button works:

For pgadmin= 4,=C2=A0always downloads the latest query result when the user makes n-numb= er of sql changes=C2=A0in the query tool, no need to execute, download take= s care of it. Does not work with macros as query is needed in the query too= l, which macros does not provide (While feature implementation, it was deci= ded that macros query won't be added to the query tool, as users may lo= se any important queries in it).

In pgadmin3, alway= s the last executed query result gets downloaded even if the user makes n-n= umber of sql changes=C2=A0in the query tool. Works with macros. For the lat= est query change results, the user has to first execute before every downlo= ad.

For Macros, with the pgadmin4 approach, even i= f we implement a download option, it would be difficult=C2=A0to decide whet= her to download the already ran macros or to download the query=C2=A0result= present in the query tool.

Please suggest.
<= /div>

I've not been happy with th= at 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 d= ifferent 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* execu= te 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).
=C2=A0
--
Dave= Page
Blog: ht= tp://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

--000000000000dda3b705b5027c5f--