Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aePfK-0005So-PT for pgadmin-hackers@arkaria.postgresql.org; Fri, 11 Mar 2016 16:11:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aePfJ-0006El-NT for pgadmin-hackers@arkaria.postgresql.org; Fri, 11 Mar 2016 16:11:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aePf5-00060E-Td for pgadmin-hackers@postgresql.org; Fri, 11 Mar 2016 16:11:36 +0000 Received: from mail-ig0-x232.google.com ([2607:f8b0:4001:c05::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aePf2-0005ZE-8N for pgadmin-hackers@postgresql.org; Fri, 11 Mar 2016 16:11:34 +0000 Received: by mail-ig0-x232.google.com with SMTP id av4so15416118igc.1 for ; Fri, 11 Mar 2016 08:11:31 -0800 (PST) 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=gqoxrnfQm5brh7UfJRCjQ4g0LwYeIZruH2pSIWIEV8A=; b=dC06xwwilmUMb4P5XDK8NehXBW0R3YdHSqRbJN6JR73pcym3zZRQKBeeQtjW832o2O cWTtFwnqiEbwdNq02GlmcXCBHiCHVxvoZW2yGecgfEetwkmPMlyjs7HUJofqvOOTKSC2 gx7J4WSgRcktZZNCp77traIl10Yi8SK77/uxq4OragYiHI8HAj3/biNarxbtkFXIFopp NgqZjbM4/iX7xwUT4AGEogCXchKd4jlhL4JRR5a/f0ywJqfiM5RBn5qh2Ctn44K1tJ33 UDhBTlcHOoHVEAcmIKZEke0M0He9KYopaRwrrGSs8CroTzg0Xm18suI/wCHCGKWfmnP9 rDvg== 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=gqoxrnfQm5brh7UfJRCjQ4g0LwYeIZruH2pSIWIEV8A=; b=OghwMy/CrUVa/WKz9Oy3yQGM3R8nVU3jAmoBp/KZkiw/ptmcoLWudlwo+MSj/9Xf9W ssjodpjHsOfK8mbyuledJGDDP5zaQ3rkJsLGk1pNutU3ABpU8xY8jv4SE94Jphh+V25V L8pWDyk7iJQx1ttmzyfxdjafeMurp24h/iLV+SsiPLO/0BJkDoOfRBKr3M6JClMHnxs8 +Wz+kF+K+Qy5ySiKcNgxJ36uLirgM6nNkKE+LAnnK43cih7ynu3C/W4VwIvo68wQlIIa mKMEuRULeEoZFGuwpL3e0rvCVQ8PyC5Xpc5EkoOmQPYjDjmtwy1tHGnyGZPXUTiRWaGq KF3w== X-Gm-Message-State: AD7BkJInMyOiLjxIGAT2zYmP5qgY99V/8bbHMzl5I3ccPt5DFRWTLEcsCyjQ9KUAX8kOzEC0Z4AL6qmFeK+QEg== MIME-Version: 1.0 X-Received: by 10.50.73.133 with SMTP id l5mr4579371igv.69.1457712690791; Fri, 11 Mar 2016 08:11:30 -0800 (PST) Received: by 10.64.213.73 with HTTP; Fri, 11 Mar 2016 08:11:30 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Mar 2016 16:11:30 +0000 Message-ID: Subject: Re: PATCH: Added Node Type & Catalog objects [pgAdmin4] From: Dave Page To: Murtuza Zabuawala 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 Tue, Mar 8, 2016 at 1:38 PM, Murtuza Zabuawala wrote: > Hi, > > PFA patch to add new nodes in pgAdmin4. > 1) Type node > 2) Catalog objects > > Note: Both above nodes depended on schema/catalog node, Please apply them > after latest patch of schema/catalog from Ashesh. > - Type node also depends on parse_priv_function_templates.patch (which I > sent in separate email today) The type node seems to need quite a bit of work - please review and test it carefully before re-submitting. There's an updated patch attached, and some review info below: Changed in the attached patch: - s/Oid/OID - Set defaults for schema and owner - Rename the Type Defintion group to Definition. - Moved some properties (acl, members) into the appropriate group - s/Enumration/Enumeration To be fixed: - This module is derived from SchemaChildModule, so why does it still have the backend support SQL? - I cleaned up most of the SQL, which was improperly indented in many places. However I have not event tried to fix up the create.sql scripts. These need reformatting to: - Use 4 character indents - Not start a line with a comma - e.g. " ,FOO=bar", which should be " FOO=bar," (obviously the commas need to trail from the line before). - The "Show System Objects" option is not honoured. - The members list should be delimited with ", " not "," - The ACL columns don't match other objects on the subnode panel - Grantee/Granter/Privileges should be Grantee/Privileges/Granter - Attempting to add a security label with empty values gives: SECURITY LABEL FOR None ON TYPE foo_enum IS NULL; - The schema is omitted from GRANT statements when creating an object, e.g. CREATE TYPE pem.foo_enum AS ENUM ('foo', 'bar', 'whizz'); ALTER TYPE pem.foo_enum OWNER TO postgres; COMMENT ON TYPE pem.foo_enum IS 'This is the foo enum'; GRANT ALL ON TYPE foo_enum TO pem_admin; - Move remaining Properties display properties to the appropriate group - e.g. ENUM labels should be in the Definition group. Only Name, OID, Owner, Alias, System Type and Comment should be under General. - The schema name is omitted when dropping a type, leading to: type "foo_enum" does not exist - The dependencies and dependents tabs don't display any data. Thanks. -- 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