Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ao8KQ-0002RS-T0 for pgadmin-hackers@arkaria.postgresql.org; Thu, 07 Apr 2016 11:42:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ao8KQ-0001Q2-AW for pgadmin-hackers@arkaria.postgresql.org; Thu, 07 Apr 2016 11:42:26 +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_2) (envelope-from ) id 1ao8KC-0001BV-O0 for pgadmin-hackers@postgresql.org; Thu, 07 Apr 2016 11:42:12 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ao8K4-0008MF-NV for pgadmin-hackers@postgresql.org; Thu, 07 Apr 2016 11:42:11 +0000 Received: by mail-pa0-x22a.google.com with SMTP id bx7so37403774pad.3 for ; Thu, 07 Apr 2016 04:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1hpan0xjnDZ1naUIjJIxAcUmeJgAla9AT577wmVn9Yw=; b=iSK98fE4LsFEC6QsvodQM61gdUhjY4MrAfbLkjxj4AJ847cv+/wkzfwpIo9inaLh6H CkWuen4I5AuIh+rTLRbUP+1IBpqIKX+kKR3usPX3TGDayrrPb8+HB5HpcbWZS1WLj6E1 fso2n05IM22VgpGJGBQS6MJ3qMNBbK8xsLRECcpo3M/Ob/QqNWwRZTUXIDrvtILb6fne p0GiPYvlzOp+wwUZkg2LuXGKZZkGIidpIcQS4QIe7d6t7OHQLzukl2oi/zKLv+N0fuL5 mgNBYtPY9aEAFjEwG3E0lNCuUPgunZx9AN3+GNyC67glYbJ4Mmmr+2kNLBV8ZVsmBZ/S gQOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1hpan0xjnDZ1naUIjJIxAcUmeJgAla9AT577wmVn9Yw=; b=b9Jg6eeBuNUlQIP5h8fuFOVlvXRFXjLGEQ3nQzuYxT3vhfz8TrfpthB1ISR1/I5V/H 0A8j7/73VrWXKvFWNIN5TQDVxJrVofA+MFLI8pFuDtQuSLONkXdglNP9HY2o+E5fGhUM sg4/nmyoOPy72ivCfW5Oz89xiW/wcXNhWnkkZK5KgnRA9AYOQxnPqvrRz95u56PFvItz 1kcUJ6onXbb0vb8KerJGWNbYfo1a3bZLqWaHp3cQUD17m18Tsb2YMKvLwm+/HYMVM/wD OnQwF0DpN6HVXPemNUfOrHZUPD68NubLaleSS2XDOGAUa9V7MWrp2ejfe2jypt0cxmCv J9xQ== X-Gm-Message-State: AD7BkJI0o4W/MqEHKjENepNw5OgiS+QqAdNlBhffaZLdkzUnlbDfA7pLVU0388hhKmE3TcQB X-Received: by 10.66.222.41 with SMTP id qj9mr4173743pac.136.1460029323122; Thu, 07 Apr 2016 04:42:03 -0700 (PDT) Received: from [172.24.35.232] ([59.162.78.200]) by smtp.gmail.com with ESMTPSA id wy7sm11723889pab.5.2016.04.07.04.42.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Apr 2016 04:42:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: PATCH: Added Node Type & Catalog objects [pgAdmin4] From: Murtuza Zabuawala In-Reply-To: Date: Thu, 7 Apr 2016 17:11:58 +0530 Cc: pgadmin-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <101BFDF3-B2FF-45A8-8990-20FD363613F6@enterprisedb.com> References: To: Dave Page X-Mailer: Apple Mail (2.2104) 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 Thanks Dave. Sure will look in it ASAP. Regards, Murtuza > On 07-Apr-2016, at 5:06 pm, Dave Page wrote: >=20 > Hi Murtuza >=20 > On Tue, Mar 22, 2016 at 9:22 AM, Dave Page wrote: >> Hi >>=20 >> On Tue, Mar 22, 2016 at 8:14 AM, Murtuza Zabuawala >> wrote: >>> Hi Dave, >>>=20 >>> We can create new external type using below method, By running all of b= elow >>> queries at the same time , we can not create separate external type by = only >>> using create type statement. >>>=20 >>> So as per my discussion with Ashesh, We should not allow user to create >>> external type in pgAdmin4 but only show definition in edit mode. >>=20 >> Hmm, would it not make sense to allow the user to create the shell >> type as well (perhaps, with a new type of "SHELL")? Then they could do >> what is needed (and that should be easy, as it's just CREATE TYPE >> foo;) >>=20 >> For example: >>=20 >> CREATE TYPE box; >>=20 >> CREATE FUNCTION my_box_in_function(cstring) RETURNS box AS ... ; >> CREATE FUNCTION my_box_out_function(box) RETURNS cstring AS ... ; >>=20 >> CREATE TYPE box ( >> INTERNALLENGTH =3D 16, >> INPUT =3D my_box_in_function, >> OUTPUT =3D my_box_out_function >> ); >>=20 >> CREATE TABLE myboxes ( >> id integer, >> description box >> ); >=20 > In the interests of making progress, I've committed the most recent > patch, with a number of minor changes most significantly, the Postgres > docs and system catalogs seem to have different ideas about what to > call length, precision and scale. pgAdmin 3 followed the catalogs and > used length and precision, however I've updated pgAdmin 4 to use > "Length/precision" and "Scale" which is inline with the Postgres docs. > That's only in the UI though - the code follows the catalogs. >=20 > There are still a couple of issues - please provide fixes ASAP: >=20 > 1) If you create a composite type that contains a sized type (e.g. > numeric(5, 4), the precision and scale are not shown if you later open > the properties dialogue, or in the reverse engineered SQL. >=20 > E.g. what pgAdmin3 shows as: >=20 > CREATE TYPE pem.blergh AS > (c1 text COLLATE pg_catalog."C", > c2 numeric(5)); >=20 > Is shown by pgAdmin4 as: >=20 > CREATE TYPE pem.blergh AS > (c1 text COLLATE pg_catalog."C", c2 numeric); >=20 > (adding the \n's would be good too). >=20 > 2) If you select a different type of type in create mode, the new > options are shown below those for the previously selected type, > instead of replacing them. Please see the attached screenshot. >=20 > 3) I would still like us to support External types. I believe the > simple option here is to re-add the code you had previously, and to > add a new type of type called "SHELL" as discussed in my previous > email above. The user would then be able to create a SHELL type, add > the required functions, then come back and create the EXTERNAL type. >=20 > I'll add cards to our internal kanban chart for these issues. >=20 > Thanks. >=20 > --=20 > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake >=20 > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers