Re: PATCH: Fix the issue for saving query output as CSV

From: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Fix the issue for saving query output as CSV
Date: 2016-07-13 12:16:42
Message-ID: CAFiP3vwtwX9G58MUXsRkyHVvOVrJTBdOuyxGcrwBO_kDrBQF8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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(dot)dhumal(at)enterprisedb(dot)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 <dpage(at)pgadmin(dot)org> wrote:
>
>> Hi
>>
>> Can you rebase this please?
>>
>> Thanks.
>>
>> On Mon, Jul 11, 2016 at 9:16 AM, Harshal Dhumal <
>> harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
>>
>>> Hi,
>>>
>>> PFA patch for RM1405. Also to allow download in runtime we will still
>>> need patch
>>> <https://www.postgresql.org/message-id/CACCA4P3JOe40WYMGjhpSWYGR%3DWuvRbbp2gfDKLnU%2B1rXuW9Www%40mail.gmail.com>
>>> sent by Neel.
>>>
>>> Changes: To download query result to CSV directly from server and not to
>>> use download attr. of anchor 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 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(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>>
>>>>
>>>> On Wed, Jun 29, 2016 at 3:52 PM, Murtuza Zabuawala <murtuza.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 <dpage(at)pgadmin(dot)org> wrote:
>>>>> >
>>>>> > On Tue, Jun 28, 2016 at 10:33 AM, Murtuza Zabuawala
>>>>> > <murtuza(dot)zabuawala(at)enterprisedb(dot)com> 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(at)postgresql(dot)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
>>
>
>

Attachment Content-Type Size
RM1405_V3_download_query_result_to_csv_server_side.patch text/x-patch 15.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Magnun Leno 2016-07-13 12:49:19 Re: [Patch] Fix Unicode in errmsg
Previous Message Harshal Dhumal 2016-07-13 11:45:43 Re: PATCH: Fix the issue for saving query output as CSV