Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9Coa-0003xW-LO for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 15:49:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d9Coa-0004GB-84 for pgadmin-hackers@arkaria.postgresql.org; Fri, 12 May 2017 15:49:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9CoZ-0004E1-F0 for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 15:49:11 +0000 Received: from mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d9CoU-0002Im-NF for pgadmin-hackers@postgresql.org; Fri, 12 May 2017 15:49:10 +0000 Received: by mail-it0-x235.google.com with SMTP id e65so39490870ita.1 for ; Fri, 12 May 2017 08:49:06 -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=TX91aqJSNkqQUtgdTv19aiEO0qyPjABb7oE5Ll/usec=; b=hfoZJIGbUZVKr1Rx9KVI4N+9SquyUf0eQ2EnZwu/UzB5Zc458EybsthKGV7ueE91e6 jcxEdlBPqyTotV18dmh89bSNqPxsZa8hMUV4acW0IbGJrwRA8vGdYbNIYWgMt4/Uty3e +sKw3glMT/Tr87T3kUQ2W+W6sxCQPBtSh+tcUPO5QhO6RBgIlZz7VW2/F/e/83QjrJ6h n2cTpRr16CAxOpU05s38aLTd0eaV20UloMg2Bl47gp9CjaRbFvjF3sNaHObJAvIu9hw0 QkA0o/0xRxlXPV9tlGgD7Q1Nyg3ibCYAHiRIJshqnVmkYeszuvhmGVsCMpljjSCHXkuv 2FIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TX91aqJSNkqQUtgdTv19aiEO0qyPjABb7oE5Ll/usec=; b=KcvU68rGBmEVRY7tTmfobAMoG8U3hxLrCmssFyNK21/Hlu1PRbgYYgin6GugZVoJg8 Jl587KjEzfOS1zR7el2Y/9kcZALZ2wTV6mGI/i4lChh4d+yJYVZeHA0RYU3tBpIfo6aP XULfwtUqEweOfVkxJHKT5S0L6gJarI9jSku190xtg+cbt7oP7jMouXQ6k/W3bx1+pZu8 In0xIaHgLUoFmOR31as4qz8mBpdXka5RLPAkCGpp77SAEAP/Laq3DboKugfGFIube0f+ Qcu9S7n20y5ZuLNOPmCKN+GnjPVKPByqZMV+i1IvR5ppz/Ao0EMbutbWgp//qtQRk0Rb t/yg== X-Gm-Message-State: AODbwcDE4qziqcJZ8+Cx3Mg9JADoA4Z83QywOHzsUEefwqjZ9UeYL7SP on/r+KCkwRWI+g3kkMF0VbGys1HvSQ== X-Received: by 10.36.31.200 with SMTP id d191mr4301840itd.85.1494604144923; Fri, 12 May 2017 08:49:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Fri, 12 May 2017 08:49:04 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Fri, 12 May 2017 16:49:04 +0100 Message-ID: Subject: Re: pgAdmin 4 commit: Improve handling of nulls and default values in the d To: Surinder Kumar Cc: Harshal Dhumal , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a11446e8623795e054f55a5e1" 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 --001a11446e8623795e054f55a5e1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Fri, May 12, 2017 at 3:20 PM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > Hi Dave, > > Please find attached patch and review. > Thanks, committed. > > Also, I found an issue which > logged and will work on it. > Yes, I also saw that, though I found the colour was lost on paste, not save. I also found another issue - https://redmine.postgresql.org/issues/2400. Can you fix that too please? Thanks. > > On Fri, May 12, 2017 at 5:19 PM, Surinder Kumar < > surinder.kumar@enterprisedb.com> wrote: > >> On Fri, May 12, 2017 at 5:00 PM, Dave Page wrote: >> >>> >>> >>> On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal < >>> harshal.dhumal@enterprisedb.com> wrote: >>> >>>> Hi, >>>> >>>> Below code snippet from above commit assumes that we have to disable >>>> last row after saving. >>>> >>>> @@ -2320,6 >>>> >>>> +2340,10 >>>> >>>> @@ define( >>>> grid.setSelectedRows([]); >>>> } >>>> >>>> + // Add last row(new row) to keep track of it >>>> + if (is_added) { >>>> + self.rows_to_disable.push(grid.getDat >>>> aLength()-1); >>>> + } >>>> >>>> However this is not the case all the time >>>> >>>> For e.g >>>> Table has some data already and If user adds new row (do not save) and >>>> then copy past few exiting rows (at this point newly added row no lon= ger >>>> remains at last position). And after saving it disable last row which = is >>>> not the newly added row. >>>> >>> >>> Hmm, good point. Can you/Surinder work up a fix for that in time for th= e >>> release please? >>> >> =E2=80=8BSure Dave, I am working on it.=E2=80=8B >> >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >> >> > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a11446e8623795e054f55a5e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Fri, May 12, 2017 at 3:20 PM, Surinder Kumar <= ;surin= der.kumar@enterprisedb.com> wrote:
= Hi Dave,

Please find attached patch and review.
<= div>
Thanks, committed.
=C2=A0

Also, I found an issue= which logged and will work on it.

<= div>Yes, I also saw that, though I found the colour was lost on paste, not = save. I also found another issue - https://redmine.postgresql.org/issues/2400. Can you fix = that too please?

Thanks.

= =C2=A0

On Fri, May 12, 2017 at 5:19 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
On Fri, May 12, 2017 at 5:00 PM, Dave Page <dpage@p= gadmin.org> wrote:


On Fri, May 12, 2017 at 12:19 PM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
=
Hi,
=
Below code snippet from above commit assumes that we have to= disable last row after saving.

@@ -2320,6 +2340,10 @@=C2=A0define(
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0grid.setSelectedRows([]);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0}
=C2=A0
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0//= =C2=A0Add=C2=A0last=C2=A0row(new=C2=A0row)=C2=A0to=C2=A0keep=C2=A0trac= k=C2=A0of=C2=A0it
+=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if=C2=A0(is_added)=C2=A0{
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0self.rows= _to_disable.push(grid.getDataLength()-1);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}
=
=C2=A0However this is not the case all the time
For e.g=C2=A0
Table has some data already and If use= r adds new row (do not save) and then copy past few exiting rows (at this p= oint =C2=A0newly added row no longer remains at last position). And after s= aving it disable last row which is not the newly added row.

Hmm, good point. Can you/Surinder work = up a fix for that in time for the release please?=C2=A0
=E2=80=8BSure Dave, = I am working on it.=E2=80=8B

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake<= br>
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 Compan= y
--001a11446e8623795e054f55a5e1--