Re: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL - Mailing list pgadmin-hackers

From Surinder Kumar
Subject Re: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL
Date
Msg-id CAM5-9D_CmhAW3ePLK90hifKKzvqrPBVfa3+BG0H1=1_D16jFQA@mail.gmail.com
Whole thread Raw
In response to Re: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL  (Dave Page <dpage@pgadmin.org>)
Responses Re: [pgAdmin4][Patch]: RM1592 - Download as CSV should be supported for DDL  (Surinder Kumar <surinder.kumar@enterprisedb.com>)
List pgadmin-hackers
On Mon, Sep 19, 2016 at 8:48 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Mon, Sep 19, 2016 at 3:03 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Please find attached patch with fix.
>>
>> Download as CSV
>>  button should be enabled only for SELECT queries.

I'm not sure there's a way to do this without parsing the query.
Simply matching on ^select certainly won't work reliably - for
example, there could be multiple statements in the script, or it could
be PERFORM ...  or UPDATE ... RETURNING ...
I wasn't aware of such cases.

I think we need to leave the button enabled, but give the user a
message if no data is returned, e.g.
​ok.​ sure.

=======
Download as CSV
-------------------------

The query executed did not return any data.

[OK]
========

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

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

pgadmin-hackers by date:

Previous
From: Surinder Kumar
Date:
Subject: [pgAdmin4][Patch]: RM1627 - Objects are not visible after creation until press refresh button
Next
From: Dave Page
Date:
Subject: pgAdmin 4 commit: Enhanced summary output for the test suite.