Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP9Z4-0006wf-U4 for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jul 2016 14:30:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bP9Z4-0003gO-Go for pgadmin-hackers@arkaria.postgresql.org; Mon, 18 Jul 2016 14:30:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bP9Yq-0003Ne-B4 for pgadmin-hackers@postgresql.org; Mon, 18 Jul 2016 14:30:20 +0000 Received: from mail-io0-x232.google.com ([2607:f8b0:4001:c06::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bP9Yi-0005NY-Jr for pgadmin-hackers@postgresql.org; Mon, 18 Jul 2016 14:30:19 +0000 Received: by mail-io0-x232.google.com with SMTP id q83so161259139iod.1 for ; Mon, 18 Jul 2016 07:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Wek3bf8cUZd4ueJBFXMSPs51KzMyCpvY1BfPx/xgNc8=; b=bTcaK5QH3FJ5BkWdmgLCGr91Xq9JtpaNRYaopxJWh91CTfAH6+nDBFrxmcebxhhRhW Eyj3FwkdLg5/Q1396URoEFmkzT+Kk+kREiWUjBOAt4pGWYsJFzYAi26sze9gj2IJvoQm zEc6yvctW8mlB6+udFCRMXUK0jYo3PHC+QtmzWYRzn4Aw079MFjpWsaw50xBzsxgbUaW TzPiKbiwM+sMEQK3yeLDXeu8RiLOsVxO3iK2V9kCTmM3Jvt1TjfTf5+PA8gVKfmgDVH5 EA/f47uEmrCjzW0hXi7ePeP8T1OQDBH8M/eQFJz0yVxnEvgQdwiKye6FbBjgalubPkXu WRJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Wek3bf8cUZd4ueJBFXMSPs51KzMyCpvY1BfPx/xgNc8=; b=hJdnEEGftnseSvBsqpkozuZ6aUGm2N8s+wqm8VX7N+JXNzGBBaKXlWFnqPNbs2FXvN dxFLFtAt4kmjs2x6RfM283dOlWFKCHnGIeZEA9U7eC92SpcK0NOARDbYVDcavxOM2dSq bxI/xmpu6j9eM8YMidPwkd84TRZE78E4aLePHehlq4IMofJVnn31OpVzAIQygXBRNznx BFURxTI4FRcg6YKwyz8w1g+V4ak3C3He6Z5V4ANncGARk16v/85WSzEqwxeBT+pPlnas qxQVL5Y9FxXOOjRYi8Hf6q5B1fcS981R3HcxzfS3i8FT6NWZqn4sOljD+MFOLcFDmIbc NR2g== X-Gm-Message-State: ALyK8tLAqyAH8VN3iUrkrNBQ5zGZ6qZd33RN1noqVpPgkq8Ujub04zQWnnBvcactSGi+NG21wfnfd3qr6fwK5A== X-Received: by 10.107.183.85 with SMTP id h82mr34941644iof.63.1468852211563; Mon, 18 Jul 2016 07:30:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Mon, 18 Jul 2016 07:30:10 -0700 (PDT) In-Reply-To: References: <70470862-26C1-4281-838E-F2C755E5C645@enterprisedb.com> <671D8CC8-C1D8-4CC1-BC32-431C496C4C5C@enterprisedb.com> From: Dave Page Date: Mon, 18 Jul 2016 15:30:10 +0100 Message-ID: Subject: Re: PATCH: Fix the issue for saving query output as CSV To: Neel Patel Cc: Harshal Dhumal , Akshay Joshi , Murtuza Zabuawala , pgadmin-hackers Content-Type: multipart/alternative; boundary=94eb2c0b8e4a4c54260537e9ce2a X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --94eb2c0b8e4a4c54260537e9ce2a Content-Type: text/plain; charset=UTF-8 Thanks, applied with minor changes to use the home dir as the default save location, and to store the save location as a persistent setting. On Mon, Jul 18, 2016 at 1:27 PM, Neel Patel wrote: > Hi, > > Please find attached patch file to support server side download in runtime > application. > > NOTE: Before applying this patch, use above harshal's patch. > > Thanks, > Neel Patel > > On Mon, Jul 18, 2016 at 5:31 PM, Harshal Dhumal < > harshal.dhumal@enterprisedb.com> wrote: > >> Hi, >> >> PFA rebased patch RM1405 (version 4) >> >> Neel will be sending patch for QT issue for same functionality. >> >> -- >> *Harshal Dhumal* >> *Software Engineer* >> >> EnterpriseDB India: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> On Mon, Jul 18, 2016 at 4:02 PM, Dave Page wrote: >> >>> Perfect, thanks! >>> >>> On Mon, Jul 18, 2016 at 11:24 AM, Neel Patel < >>> neel.patel@enterprisedb.com> wrote: >>> >>>> Yes. I am just testing with different OS. I will send it next 1-2 hour. >>>> >>>> Is it fine ? >>>> >>>> Thanks, >>>> Neel Patel >>>> >>>> On Mon, Jul 18, 2016 at 3:53 PM, Dave Page wrote: >>>> >>>>> Any chance of getting that in the next couple of hours so I can get it >>>>> into beta 3? >>>>> >>>>> On Mon, Jul 18, 2016 at 11:18 AM, Dave Page wrote: >>>>> >>>>>> Thanks! >>>>>> >>>>>> On Mon, Jul 18, 2016 at 10:42 AM, Neel Patel < >>>>>> neel.patel@enterprisedb.com> wrote: >>>>>> >>>>>>> Hi Dave, >>>>>>> >>>>>>> Yes, it will break in runtime. If we need to support downloading at >>>>>>> server side then we need to change the runtime code. >>>>>>> I will send the patch for runtime to support server side download >>>>>>> CSV file. >>>>>>> >>>>>>> Thanks, >>>>>>> Neel Patel >>>>>>> >>>>>>> On Fri, Jul 15, 2016 at 3:05 PM, Dave Page >>>>>>> wrote: >>>>>>> >>>>>>>> Hi >>>>>>>> >>>>>>>> This seems to break downloads in the runtime. It works in Safari >>>>>>>> and Chrome, but in the runtime the suggested filename is >>>>>>>> "6980287?query=SELECT+*+FROM+pem.probe_column%0AORDER+BY+id%0AASC+&filename=probe_column.csv", >>>>>>>> and after changing that and hitting OK, the "Downloading file" dialogue is >>>>>>>> shown indefinitely. >>>>>>>> >>>>>>>> On Wed, Jul 13, 2016 at 1:16 PM, Harshal Dhumal < >>>>>>>> harshal.dhumal@enterprisedb.com> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> PFA rebased patch for RM1405 >>>>>>>>> >>>>>>>>> -- >>>>>>>>> *Harshal Dhumal* >>>>>>>>> *Software Engineer* >>>>>>>>> >>>>>>>>> EnterpriseDB India: http://www.enterprisedb.com >>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>> >>>>>>>>> On Wed, Jul 13, 2016 at 5:15 PM, Harshal Dhumal < >>>>>>>>> harshal.dhumal@enterprisedb.com> wrote: >>>>>>>>> >>>>>>>>>> Yes sure >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> *Harshal Dhumal* >>>>>>>>>> *Software Engineer* >>>>>>>>>> >>>>>>>>>> EnterpriseDB India: http://www.enterprisedb.com >>>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>>> >>>>>>>>>> On Wed, Jul 13, 2016 at 5:10 PM, Dave Page >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi >>>>>>>>>>> >>>>>>>>>>> Can you rebase this please? >>>>>>>>>>> >>>>>>>>>>> Thanks. >>>>>>>>>>> >>>>>>>>>>> On Mon, Jul 11, 2016 at 9:16 AM, Harshal Dhumal < >>>>>>>>>>> harshal.dhumal@enterprisedb.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> PFA patch for RM1405. Also to allow download in runtime we will >>>>>>>>>>>> still need patch >>>>>>>>>>>> >>>>>>>>>>>> sent by Neel. >>>>>>>>>>>> >>>>>>>>>>>> Changes: To download query result to CSV directly from server >>>>>>>>>>>> and not to use download attr. of anchor tag () as it's not support by >>>>>>>>>>>> all of major browsers (e.g. Safari). >>>>>>>>>>>> Also it's not feasible to load data in html to download if >>>>>>>>>>>> result set of query is very huge (in GBs). >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> *Harshal Dhumal* >>>>>>>>>>>> *Software Engineer* >>>>>>>>>>>> >>>>>>>>>>>> EnterpriseDB India: http://www.enterprisedb.com >>>>>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jun 29, 2016 at 4:53 PM, Akshay Joshi < >>>>>>>>>>>> akshay.joshi@enterprisedb.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala >>>>>>>>>>>> zabuawala@enterprisedb.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Yes, It will not work in runtime as well but I think Neel is >>>>>>>>>>>>>> working for fix in run time for this issue, We might able to fix it in run >>>>>>>>>>>>>> time but issue persists in Safari unless they add support in browser itself. >>>>>>>>>>>>>> >>>>>>>>>>>>>> https://webkit.org/status/#feature-download-attribute >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> > On 29-Jun-2016, at 3:40 pm, Dave Page >>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala >>>>>>>>>>>>>> > wrote: >>>>>>>>>>>>>> >> Yes Dave, I agree that downloading files has been >>>>>>>>>>>>>> supported in browsers since long . >>>>>>>>>>>>>> >> >>>>>>>>>>>>>> >> But in general we send request & then receives files from >>>>>>>>>>>>>> web server but in our case we are fetching our data from Backbone models & >>>>>>>>>>>>>> then converting it to CSV format for downloading as a file at client side >>>>>>>>>>>>>> in browser itself. >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > If Safari doesn't support client-side saving of files, then >>>>>>>>>>>>>> I have to >>>>>>>>>>>>>> > wonder if our runtime will either - both are webkit based. >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > So I guess the next question to ask is; why don't we just >>>>>>>>>>>>>> generate the >>>>>>>>>>>>>> > CSV on the server side? >>>>>>>>>>>>>> > >>>>>>>>>>>>>> >>>>>>>>>>>>>> @Akshay, >>>>>>>>>>>>>> Can you please suggest on above? >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> As we already have complete data in backgrid's full >>>>>>>>>>>>> collection, so I have used it instead of fetching it again. >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> > -- >>>>>>>>>>>>>> > Dave Page >>>>>>>>>>>>>> > Blog: http://pgsnake.blogspot.com >>>>>>>>>>>>>> > Twitter: @pgsnake >>>>>>>>>>>>>> > >>>>>>>>>>>>>> > EnterpriseDB UK: http://www.enterprisedb.com >>>>>>>>>>>>>> > The Enterprise PostgreSQL Company >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Sent via pgadmin-hackers mailing list ( >>>>>>>>>>>>>> pgadmin-hackers@postgresql.org) >>>>>>>>>>>>>> To make changes to your subscription: >>>>>>>>>>>>>> http://www.postgresql.org/mailpref/pgadmin-hackers >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> *Akshay Joshi* >>>>>>>>>>>>> *Principal Software Engineer * >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> *Phone: +91 20-3058-9517 <%2B91%2020-3058-9517>Mobile: +91 >>>>>>>>>>>>> 976-788-8246* >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Dave Page >>>>>>>>>>> Blog: http://pgsnake.blogspot.com >>>>>>>>>>> Twitter: @pgsnake >>>>>>>>>>> >>>>>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>>>>>>> The Enterprise PostgreSQL Company >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Dave Page >>>>>>>> Blog: http://pgsnake.blogspot.com >>>>>>>> Twitter: @pgsnake >>>>>>>> >>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>>>> The Enterprise PostgreSQL Company >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Dave Page >>>>>> Blog: http://pgsnake.blogspot.com >>>>>> Twitter: @pgsnake >>>>>> >>>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>> The Enterprise PostgreSQL Company >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Dave Page >>>>> Blog: http://pgsnake.blogspot.com >>>>> Twitter: @pgsnake >>>>> >>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>> The Enterprise PostgreSQL Company >>>>> >>>> >>>> >>> >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >> >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --94eb2c0b8e4a4c54260537e9ce2a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks, applied with minor changes to use the home dir as = the default save location, and to store the save location as a persistent s= etting.

On M= on, Jul 18, 2016 at 1:27 PM, Neel Patel <neel.patel@enterprisedb= .com> wrote:
Hi,

Please find attached patch file to support server= side download in runtime application.

NOTE: Befor= e applying this patch, use above harshal's patch.

<= div>Thanks,
Neel Patel

On Mon, = Jul 18, 2016 at 5:31 PM, Harshal Dhumal <harshal.dhumal@ente= rprisedb.com> wrote:
Hi,

PFA rebased patch RM1405 (version 4)<= br>
Neel will be sending patch for QT issue for same function= ality.

=
--=C2=A0
Harshal Dhumal
Software Engineer

EnterpriseDB India:=C2=A0http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Mon, Jul 18, 2016 at 4:0= 2 PM, Dave Page <dpage@pgadmin.org> wrote:
Perfect, thanks!

On Mon, Jul 18, 2016 at 11= :24 AM, Neel Patel <neel.patel@enterprisedb.com> w= rote:
Yes. I am just tes= ting with different OS. I will send it next 1-2 hour.=C2=A0

Is= it fine ?

Thanks,
Neel Patel

= On Mon, Jul 18, 2016 at 3:53 PM, Dave Page <dpage@pgadmin.org> wrote:
Any chance of = getting that in the next couple of hours so I can get it into beta 3?
=

On Mon,= Jul 18, 2016 at 11:18 AM, Dave Page <dpage@pgadmin.org> wro= te:
Thanks!

On Mon, Jul 18= , 2016 at 10:42 AM, Neel Patel <neel.patel@enterprisedb.com&= gt; wrote:
Hi Dav= e,

Yes, it will break in runtime. If we need to support = downloading at server side then we need to change the runtime code.
I will send the patch for runtime to support server side download CSV fi= le.

Thanks,
Neel Patel
<= div>

On Fri, Jul 1= 5, 2016 at 3:05 PM, Dave Page <dpage@pgadmin.org> wrote:
=
Hi

This = seems to break downloads in the runtime. It works in Safari and Chrome, but= in the runtime the suggested filename is "6980287?query=3DSELECT+*+FR= OM+pem.probe_column%0AORDER+BY+id%0AASC+&filename=3Dprobe_column.csv&qu= ot;, and after changing that and hitting OK, the "Downloading file&quo= t; dialogue is shown indefinitely.

On Wed, Jul 13, 2016 at 1:16 PM, Har= shal Dhumal <harshal.dhumal@enterprisedb.com> = wrote:
Hi,

<= /div>PFA rebased patch for RM1405

--=C2=A0
Harshal= Dhumal
Software Engineer

<= div>EnterpriseDB In= dia:=C2=A0http://www.enterprisedb.co= m
The Enterprise PostgreSQL Company
=

On Wed, Jul 13, 2016 at 5:1= 5 PM, Harshal Dhumal <harshal.dhumal@enterprisedb.com>= ; wrote:
Yes sure=

--=C2=A0
Harshal Dhumal
Software Eng= ineer

EnterpriseDB India:=C2=A0http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Wed, Jul 13, 2016 at 5:1= 0 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

Can you rebase this= please?

Thanks.

On Mon, Jul 11, 2016 at 9:1= 6 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com>= ; wrote:
Hi,

PFA patch for RM1405. Also to allow download in runtime = we will still need patch sent by Neel.

Changes: To download = query result to CSV directly from server and not to use download attr. of a= nchor tag (<a>) as it's not support by all of major browsers (e.g= . Safari).
Also it's not feasible to load data in html to download i= f result set of query is very huge (in GBs).<= br>




--= =C2=A0
Harshal Dhumal
Software Engineer

EnterpriseDB India:=C2=A0http://www.enterprisedb.com
The Ente= rprise PostgreSQL Company

On Wed, Jun 29, 2016 at 4:53 PM, Akshay Josh= i <akshay.joshi@enterprisedb.com> wrote:

=
On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wro= te:
Yes, It will not work in runtime as w= ell but I think Neel is working for fix in run time for this issue, We migh= t able to fix it in run time but issue persists in Safari unless they add s= upport in browser itself.

https://webkit.org/status/#feature-download-att= ribute


> On 29-Jun-2016, at 3:40 pm, Dave Page <dpage@pgadmin.org> wrote:
>
> On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala
> <murtuza.zabuawala@enterprisedb.com> wrote:
>> Yes Dave, I agree that downloading files has been supported in bro= wsers since long .
>>
>> But in general we send request & then receives files from web = server but in our case we are fetching our data from Backbone models & = then converting it to CSV format for downloading as a file at client side i= n browser itself.
>
> If Safari doesn't support client-side saving of files, then I have= to
> wonder if our runtime will either - both are webkit based.
>
> So I guess the next question to ask is; why don't we just generate= the
> CSV on the server side?
>

@Akshay,
Can you please suggest on above?

=C2=A0 =C2=A0As we already have complete data in backgrid's full collection, so I have used it instead of fetching it again. =C2=A0 = =C2=A0

> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers=


--
Akshay Joshi
Principal Software Enginee= r=C2=A0

=

+91 20-3058-9517
Mobile: +91 976-788-8246




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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL= Company





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

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL= Company




--
=
Dave Page
Blog: http://pgsnake.blogspot.comTwitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterpris= e PostgreSQL Company



--
=
Dave Page
Blog: http://pgsnake.blogspot.comTwitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterpris= e PostgreSQL Company




--
=
Dave Page
Blog: http://pgsnake.blogspot.comTwitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterpris= e PostgreSQL Company





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

EnterpriseDB UK: http://www.enterprised= b.com
The Enterprise PostgreSQL Company
--94eb2c0b8e4a4c54260537e9ce2a--