Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8jws-0006I1-PR for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 08:59:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d8jws-0002tt-C5 for pgadmin-hackers@arkaria.postgresql.org; Thu, 11 May 2017 08:59:50 +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 1d8jwe-0002V1-44 for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 08:59:36 +0000 Received: from mail-it0-x22a.google.com ([2607:f8b0:4001:c0b::22a]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d8jwa-0005x7-Jo for pgadmin-hackers@postgresql.org; Thu, 11 May 2017 08:59:35 +0000 Received: by mail-it0-x22a.google.com with SMTP id c15so39924127ith.0 for ; Thu, 11 May 2017 01:59:32 -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=B3ckREQ/S+piMu/Co+Wfm7yHObXwvTCr0W3Gk8f5hZo=; b=jx5CXshSX6G7oPoyGO9dbX4DQk02i62QgiSYMJWi3d0bNuRIokhEiI6Wrvsh3mOzUk PuZBMFNXbcQdsY+JAAGDVxRXNJDUyUVp4QanSBHKAxTkL8ofH52swl5Er87WAkCYgePs XZ/jE+qn9AhmiQ5HeUSaVNGo72mdv/17kSoIdV6t02m0PJEQ28IuKirFg5bF4AZ1PqXo ClkmiRstPh1tR9Qb5oOsEsaUrfm1i4frPfwuWLy6KEswvLcn2IQGyLQ9cq4aHmXaaLow UufZUxNO1/q+ykLuXSrs9O6/GXwvnIGFQgfOPGhCL7a5zi5oZlnoutRMFtL7yncrEdgL GLDw== 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=B3ckREQ/S+piMu/Co+Wfm7yHObXwvTCr0W3Gk8f5hZo=; b=m6NXaWiWLG7RDki336yq4egNq2s1yLSz+ZFfltiBp8nm73G4DdePqGwX7k/ecONQv+ GZIE4dmWCQ0q4c3eP0SC3ALSZ9kUlFsc429UBuU58fXn12kGcYsYbj6DQBiQrVylggL+ IRpGXlzhddzT0Nb3TSn2+dUFIZv25Z4oTNgGksr4fvOIqb6FywKAhRXduDUKGZZP2sT8 7SV8vwqW0lxh3RForjljctydYPPg5DB2lgEFTJcvHFWbGOYDI0ekvWkBd2kk1iv0TxmV Wooki48Cv7BmUndgyT10s0FAntBV8vGtOD1X49+frGmlbORXWuwOB2YCItkQ7BxbKJtv jdjg== X-Gm-Message-State: AODbwcDROCSSFkM8p7UZc6wey2fBta+ukaDW6zfilCPrmWxHGZeph4xl nICScny0DZUYzXzv6etmtLbpanhrPA== X-Received: by 10.36.31.200 with SMTP id d191mr9118962itd.85.1494493171046; Thu, 11 May 2017 01:59:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Thu, 11 May 2017 01:59:30 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Thu, 11 May 2017 09:59:30 +0100 Message-ID: Subject: Re: [pgAdmin4][Patch][RM2257]: Query tool - Insert row doesn't use default values To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11446e8694860d054f3bce62 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 --001a11446e8694860d054f3bce62 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ooops, managed to hit send too soon. ... it leads to failed updates such as: 2017-05-11 09:55:47,570: SQL pgadmin: Execute (void) for server #1 - CONN:2096775 (Query-id: 4540472): UPDATE public.defaults SET data_default_no_nulls =3D 'asas' WHERE ; 2017-05-11 09:55:47,577: ERROR pgadmin: Failed to execute query (execute_void) for the server #1 - CONN:2096775 (Query-id: 4540472): Error Message:ERROR: syntax error at or near ";" LINE 3: ; On Thu, May 11, 2017 at 9:58 AM, Dave Page wrote: > Hi > > There seems to be couple of bugs in this; > > - When creating a new row with my test table, if I click in the id column= , > don't change anything, then click in another column, the ID column value > changes from [default] to [null], making it impossible to save that row > with the default value. In this case I would expect it to stay at [defaul= t] > unless I explicitly entered a value. > > - When I add a new row, but leave the id as [default], the row is saved, > but the [default] marker changes from gray to black (but only in the id > column. > > - I'm able to edit a freshly added row immediately after saving but befor= e > refreshing. This shouldn't be allowed if we don't know what the primary k= ey > value is, as it leads to failed updates such as: > > > On Wed, May 10, 2017 at 9:52 AM, Surinder Kumar < > surinder.kumar@enterprisedb.com> wrote: > >> Hi Dave, >> >> Please find attached patch for RM only. >> >> *Changes:* >> >> - All formatters now handles both [null] and [default] values >> >> - the cell values are validated on server side as in pgAdmin3. >> >> - added light grey color for cells with [null] and [default] >> placeholders. >> >> On Wed, May 10, 2017 at 2:12 PM, Dave Page wrote: >> >>> >>> >>> On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar < >>> surinder.kumar@enterprisedb.com> wrote: >>> >>>> Hi Dave, >>>> >>>> On Wed, May 10, 2017 at 2:06 PM, Dave Page wrote: >>>> >>>>> Any chance we can get this wrapped up today Surinder? >>>>> >>>> =E2=80=8BI have fixed RM case, I am currently writing its feature test= cases >>>> which is taking some time. >>>> Should I send patch for RM case only?=E2=80=8B I will try to complete = test >>>> cases by today eod. >>>> >>> >>> Yes please. >>> >>> Thanks! >>> >>> -- >>> 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 > --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a11446e8694860d054f3bce62 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ooops, managed to hit send too soon.

..= . it leads to failed updates such as:

2017-05= -11 09:55:47,570: SQL pgadmin: Execute (void) for server #1 - CONN:2096775 (Query-id:= 4540472):
UPDATE public.defaults SET
data_default_no_n= ulls =3D 'asas' WHERE
;
2017-05-11 09:55:47,577= : ERROR pgadmin: =
Failed to execute query (execute_void) for the server #1 = - CONN:2096775
(Query-id: 4540472):
Error Message:ERROR= : =C2=A0syntax error at or near ";"
LINE 3: ;


On Thu, May 11, 2017 at 9:58 AM, Dave Page <dpage@pgadmin.org>= ; wrote:
Hi
<= br>
There seems to be couple of bugs in this;=C2=A0
- When creating a new row with my test table, if I click in the= id column, don't change anything, then click in another column, the ID= column value changes from [default] to [null], making it impossible to sav= e that row with the default value. In this case I would expect it to stay a= t [default] unless I explicitly entered a value.

-= When I add a new row, but leave the id as [default], the row is saved, but= the [default] marker changes from gray to black (but only in the id column= .

- I'm able to edit a freshly added row immed= iately after saving but before refreshing. This shouldn't be allowed if= we don't know what the primary key value is, as it leads to failed upd= ates such as:


On Wed, May = 10, 2017 at 9:52 AM, Surinder Kumar <surinder.kumar@enterpri= sedb.com> wrote:
Hi Dave,=

Please find attached pat= ch for RM only.

Cha= nges:
<= br>
=C2=A0- All formatters now=C2=A0handl= es both [null] and [default] values

<= /div>
=C2=A0- the cel= l values are validated on server side as in pgAdmin3.

=C2=A0- added light grey color for cells with = [null] and [default] placeholders.

On Wed, May 10, 2017 at 2:12 PM, Dave= Page <dpage@pgadmin.org> wrote:


On Wed, May 10, 2017 at 9:39 AM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi Dave,

On Wed, May 10, 2017 at 2:06 PM, Dave Page = <dpage@pgadmin.or= g> wrote:
= Any chance we can get this wrapped up today Surinder?
=E2=80=8BI have fixed RM case, I am curr= ently writing its feature test cases which is taking some time.
Should I send patch for RM case only?=E2=80=8B I w= ill try to complete test cases by today eod.
=

Yes please.

<= div>Thanks!

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

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




--
=
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.enterprised= b.com
The Enterprise PostgreSQL Company
--001a11446e8694860d054f3bce62--