Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agvuF-0003GN-1i for pgadmin-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 15:01:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agvuE-00052M-Jj for pgadmin-hackers@arkaria.postgresql.org; Fri, 18 Mar 2016 15:01:38 +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 1agvu0-0004GZ-EB for pgadmin-hackers@postgresql.org; Fri, 18 Mar 2016 15:01:24 +0000 Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1agvtu-0004fT-Hj for pgadmin-hackers@postgresql.org; Fri, 18 Mar 2016 15:01:23 +0000 Received: by mail-ig0-x232.google.com with SMTP id ig19so23639338igb.1 for ; Fri, 18 Mar 2016 08:01:18 -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:date:message-id:subject:from:to :cc; bh=2ejjH378x6iiX2VU0t+FwpvHSaDoY1zFysI7G+4aWYw=; b=GCwJv+4BSDPBAsyu1LRGt4GXyVDdpaefjvW/C9jd6S3feg4Fk///P9AQcq2kFs9GxB YNrJR7cTkLDJ5OYpe+CCP9KFkk/aSUvMW1DJ6UiFa4TdzNfyWq15ReRHGoaJAPtLsEi8 RxheGThO+Bz6QxTr791gscde7lDuK/PNV7VC0WJkefzRuvadD+5YRJWkjEFapQxnVYgO Nm6nQ6K0G6qP2eW2AJB3zMMdPR6uUGaWQU8NX3zByXcWnI5p7UTKbcTwNwjX1xcTpLev uJieKEcKY2VzzKcIBmZSX2lyUt+VmduNgpWTKY4cdv9Q0fQsAvXD7B3PfJZOXQ4qSrOO L3rQ== 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=2ejjH378x6iiX2VU0t+FwpvHSaDoY1zFysI7G+4aWYw=; b=RIqtuRtSP0lD/XjInTOSlDTySbV1uG9vf1O/Zd6fe+iyK+KrnxaXLmRMO+UWKGYIq0 xV6EWkYTuAsa9ECUcC7i8iixAtuuEdJUf+wMtzUh4f+NfGNVDlq8TC1RZO1kJdz/+oLs Vs37COllC9AFJfXt49L4n+kZBLu0tt5BSLbiB5f4PHUEs+7vfQ6p2rTAiBCNFwe9uty1 N/0Gh1XBVet0opQrXpNvlnv+BUKvFuVSs9sSCxtX+fPXu1DmuUqaL3IAByuf0Z00Wt0Y eUAVKBT/RkVZUDacuhVsLEG7HL0MznYtPH/yUVkcIuOzkQoaBN7bys5KjaQ0CFxwYIuf /U2A== X-Gm-Message-State: AD7BkJI73+UvKGbuGpsMsaXeLYhrykCtrwH+KzEl3I5D9J7VhXxkGM3//f7zWjBIZkumIR0EG+sMZtBPYdpu8Q== MIME-Version: 1.0 X-Received: by 10.50.79.196 with SMTP id l4mr18837521igx.11.1458313275303; Fri, 18 Mar 2016 08:01:15 -0700 (PDT) Received: by 10.64.213.73 with HTTP; Fri, 18 Mar 2016 08:01:15 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Mar 2016 15:01:15 +0000 Message-ID: Subject: Re: pgAdmin4 PATCH: Domain Module From: Dave Page To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: text/plain; charset=UTF-8 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 On Thu, Mar 17, 2016 at 5:39 PM, Khushboo Vashi wrote: > 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? Yes, I think that's a good approach (at least, I don't see any downsides right now :-) ) -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers