Re: [patch] Column selection on SQLEditor

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Joao Pedro De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Atira Odhner <aodhner(at)pivotal(dot)io>
Subject: Re: [patch] Column selection on SQLEditor
Date: 2017-03-15 22:03:21
Message-ID: CA+OCxoyaVxm5aT2L1mtnO5rpsV8QTtzJ6f13AxWzfxDpjpC+cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Tue, Mar 14, 2017 at 10:08 PM, Joao Pedro De Almeida Pereira
<jdealmeidapereira(at)pivotal(dot)io> wrote:
> Hi Hackers,
>
> Attached you can find the patches that finish the following Redmine Issue
> https://redmine.postgresql.org/issues/2216
>
> Note:
> These changes depend on the acceptance of the patch that we submitted on the
> email thread: "Refactor: clipboard, translations, jasmine"
>
> This makes some changes and adds testing around the way csv is copied to the
> clipboard.
> We had to write a new plugin to handle selecting columns since slickGrid
> does not care much about columns.
>
> We also fixed a bug with the csv selection where strings were not being
> quoted. (it was introduced recently.) Now there are jasmine tests around it.

This doesn't seem to work as one would expect. Given a test query of
"SELECT * FROM pg_class":

- I select the relnamespace column, hit Copy, and I can paste the
results (as expected).

- I then select the relhasindex column as well. I hit Copy, and when I
paste, I only get the relhasindex values.

- I un-check relhasindex, and check relfilenode. This time when I
paste, I see both relnamespace and relhasindex in the output (as
expected).

- I then un-check the second row; this time when I paste the results,
I only get 239 rows (I expect 1298).

In short, behaviour seems quite unpredictable and somewhat broken.

Some additional comments;

- I wonder if the checkbox should be vertically centered to left of
both the column name and type, rather than just the name. I suspect
that would look better.

- Please don't use brand names (or trademarks etc) in test data :-)

Thanks!

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

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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-03-15 22:06:09 pgAdmin 4 commit: Ensure the screenshots directory exists before trying
Previous Message Shirley Wang 2017-03-15 20:48:21 Re: [Design Update][History]