Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agbtK-0000Pp-Pj for pgadmin-hackers@arkaria.postgresql.org; Thu, 17 Mar 2016 17:39:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agbtK-0008MF-Ax for pgadmin-hackers@arkaria.postgresql.org; Thu, 17 Mar 2016 17:39:22 +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 1agbtJ-0008M9-Th for pgadmin-hackers@postgresql.org; Thu, 17 Mar 2016 17:39:21 +0000 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1agbtF-0005Sa-VH for pgadmin-hackers@postgresql.org; Thu, 17 Mar 2016 17:39:21 +0000 Received: by mail-lb0-x232.google.com with SMTP id k12so73095436lbb.1 for ; Thu, 17 Mar 2016 10:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=+Ba5yWG+lWN/7vRtBx0S1cLFbjiyt7twdfEuQj2HiiQ=; b=SDbWh8sDouLBvrG8JEXCha/me/pAoMsxpqVpgcioeHsqubTBnX1AU17SSyYHrU29hp Rq06vCqGe8g//jBN2W3jNdStrUf3eo3/CODVCTDYupHHih4NGMR2yMkLQOmdWtU8RtcK rlgHfl3V4n5BBy+YAoENx5Z7ria8Ill6oFgErd81fsOwf5dFgyPhswgxCrIiwoeeCegk kD0MfjVlDs7DczupfBUeo2wWFb/nhnrWYyUv7G0TKqzKEcobSGRCQBQBYE7fcj0euZ5m H7a0bY9JV58nJ8yYOKPDbEDZRexp8y+NKolaHSa+lgX0LBc4cwqHsNSd2eVCjaxTIMhL U2Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=+Ba5yWG+lWN/7vRtBx0S1cLFbjiyt7twdfEuQj2HiiQ=; b=fLFPCkPM2XT7dkLl7AyNM9/n0JqB+In56TP/m068cu1u6FRwQMq+gyy+USytDT/B6M uLHgJXMck1Qww1GQRhYBDz0v7fCqjbDhkrsqQg6rddNvHCI0kj0sWBlirPIiJgu1rp9M aEMjnvdeqkawGkU2borW6nk6XgUiHhvsA5SNY7kWinq8q8ZSNS8Z7KMI0+JlzovuZGAk Vy2GuomDX3NpJ+7GIRkcvkFKxSXupj5mWE/9RP63HlMDuix8ed3sKoVS/MfnVCFDlMAu qBztRx73gqa/KPHOq15TxVm8JubR8Rc9/qx4JWLSX0biDk0+bjXFlaOqODobrb0zajGo gQSA== X-Gm-Message-State: AD7BkJKTsUrSvy0xd4ZVAp9RNtFVk8cA+TqejapCw0rUuIyJMawBQzI7MVu6eyhBla5QFKAiFH1ZDt8jxV7DF+x7 MIME-Version: 1.0 X-Received: by 10.112.199.138 with SMTP id jk10mr4137299lbc.91.1458236357303; Thu, 17 Mar 2016 10:39:17 -0700 (PDT) Received: by 10.25.159.85 with HTTP; Thu, 17 Mar 2016 10:39:17 -0700 (PDT) In-Reply-To: References: Date: Thu, 17 Mar 2016 23:09:17 +0530 Message-ID: Subject: Re: pgAdmin4 PATCH: Domain Module From: Khushboo Vashi To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a11c3358a137524052e421c54 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 --001a11c3358a137524052e421c54 Content-Type: text/plain; charset=UTF-8 Hi Dave, I have a query regarding your below feedback : * - Default values should be auto-quoted when necessary (ie. strings, on a text-based domain).* To resolve this, I have checked the typcategory field from pg_type for the base_type selected for the Domain. If the typcategory is String type (i.e. S), then only I have used qtLiteral function to quote the default value. Is this right approach or not? Thanks, Khushboo On Wed, Mar 16, 2016 at 9:40 PM, Dave Page wrote: > Hi > > On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi > wrote: > > Hi, > > > > Please find the updated Domain Module Patch. > > > > To test this patch, please apply Backgrid Textarea Cell Patch before > this. > > Thanks. I believe with the following fixes, we'll be done :-) > > - Default values should be auto-quoted when necessary (ie. strings, on > a text-based domain). > > - "System Domain?" should be in the General section, between owner and > comment. > > - The switches should use the same colouring/styling as other objects, e.g. > > options: { > 'onText': 'Yes', 'offText': 'No', > 'onColor': 'success', 'offColor': 'primary', > 'size': 'small' > } > > - Please remove the Schema property from the main properties tab (not > the properties dialogue). > > - No icon is show for Checks on the Dependents tab for a domain. > > - The add button on the Security Labels tab is spelt "Add". Why is > that? Other instances of this grid use "ADD" which is the default in > backform.pgadmin.js. > > - Dependencies on domain check constraints are listed as being on a > "Type" not a "Domain". > > - If adding a domain constraint using the grid on the Domain dialogue, > I cannot specify "NOT VALID". We need a checkbox for that in a narrow > columns at the end. Unchecking it for an existing constraint should be > the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT" > > - If I switch the "Don't Validate" switch on a constraint, there are > leading blank lines in the generated SQL. The same occurs when adding > a comment to a constraint. > > - I think we need to reverse the meaning of "Don't Validate" and > rename to match the "Valid?" field that's on the properties list. > Otherwise it's not clear they're the same thing. > > - s/Not Null/Not Null?/ > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a11c3358a137524052e421c54 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

I have= a query regarding your below feedback :

- Default values should be auto-quoted when necessary (ie. strings, on a te= xt-based domain).

To resolve this, I have checked the typc= ategory field from pg_type for the base_type selected for the Domain.
If the typcategory is String type=C2=A0 (i.e. S), then only I have used= qtLiteral function to quote the default value.

Is this right = approach or not?

Thanks,
Khushboo
<= div>


On W= ed, Mar 16, 2016 at 9:40 PM, Dave Page <dpage@pgadmin.org> w= rote:
Hi

On Wed, Mar 16, 2016 at 2:03 PM, Khushboo Vashi
<khushboo.vashi@enter= prisedb.com> wrote:
> Hi,
>
> Please find the updated Domain Module Patch.
>
> To test this patch, please apply Backgrid Textarea Cell Patch before t= his.

Thanks. I believe with the following fixes, we'll be done :-)
- Default values should be auto-quoted when necessary (ie. strings, on
a text-based domain).

- "System Domain?" should be in the General section, between owne= r and comment.

- The switches should use the same colouring/styling as other objects, e.g.=

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 options: {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'onText': 'Yes', = 'offText': 'No',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'onColor': 'success&#= 39;, 'offColor': 'primary',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'size': 'small' =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

- Please remove the Schema property from the main properties tab (not
the properties dialogue).

- No icon is show for Checks on the Dependents tab for a domain.

- The add button on the Security Labels tab is spelt "Add". Why i= s
that? Other instances of this grid use "ADD" which is the default= in
backform.pgadmin.js.

- Dependencies on domain check constraints are listed as being on a
"Type" not a "Domain".

- If adding a domain constraint using the grid on the Domain dialogue,
I cannot specify "NOT VALID". We need a checkbox for that in a na= rrow
columns at the end. Unchecking it for an existing constraint should be
the equivalent of doing "ALTER DOMAIN ... VALIDATE CONSTRAINT"
- If I switch the "Don't Validate" switch on a constraint, th= ere are
leading blank lines in the generated SQL. The same occurs when adding
a comment to a constraint.

- I think we need to reverse the meaning of "Don't Validate" = and
rename to match the "Valid?" field that's on the properties l= ist.
Otherwise it's not clear they're the same thing.

- s/Not Null/Not Null?/


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

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

--001a11c3358a137524052e421c54--