Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7fMI-0004VS-GV for pgadmin-hackers@arkaria.postgresql.org; Tue, 31 May 2016 08:49:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b7fMH-0000lt-S5 for pgadmin-hackers@arkaria.postgresql.org; Tue, 31 May 2016 08:49:05 +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 1b6y1l-0004NK-Kl for pgadmin-hackers@postgresql.org; Sun, 29 May 2016 10:33:01 +0000 Received: from mail-ig0-x230.google.com ([2607:f8b0:4001:c05::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b6y1c-0006aN-QL for pgadmin-hackers@postgresql.org; Sun, 29 May 2016 10:33:01 +0000 Received: by mail-ig0-x230.google.com with SMTP id ct2so16460939igb.0 for ; Sun, 29 May 2016 03:32:52 -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:from:date:message-id:subject:to :cc; bh=VnkyhBUTnNYJGT5M3VO4ZyjnLHdRuEfgpe1+sILE6Sk=; b=JJy7fgNTzmBFZ6tSB8hTnSVvrwhbBLoonEFUlOl0PhwLjUcDh47eVcYHPetJtS0rtU 4ooiA9r36zJ8x0qPXfHMhl6GMO/BmY7abov9+LR4CF4rNhiumbAS94yV/ngbckCu0DjV y/0adN0cfpDxQzYK1mC9AvdSl9RLNYxMhzsvWjF0fIcwN9iHxhx1g13mhPdl7TxrYK2H r9Me6FzSVuWpbejl8r6qs9VWrTwq7Ln6XCV40eB5O8ePBjCRI6+lomt8+5NjwiXE1ZoN i2T45RHM5wKvye0eBijHUQ7qyc+TzEjS1F9yVOs6nS1upZpJmk/KZs8QH2ae/0naAl8W gaew== 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:from:date :message-id:subject:to:cc; bh=VnkyhBUTnNYJGT5M3VO4ZyjnLHdRuEfgpe1+sILE6Sk=; b=ZF7yQj3tWCLRZ/jsD7YOMWTLhJIk8YfCLE/SonOzpCMEgckTH3nQYlbcROUi8TEJi5 wMxJwmIDoVnQNjLrK+AAFxJN4GTgjpY0zTfauO3WRCTPKa1RhIOIVp0T9HlxBce/o2cj AkcGpPGEnuFQ8fn9Sj+gtP21ZQcStYvtLwQVZlUXkzJNAS0kJ0CCLtu/Bs0kte8AuEWm LIQrLf+ZfekV4gQUBtc3SIKRkUoMMJc1I7/M5jD7xpywnqkIFIBb1R/yyAYpLAWHbzaZ u5TopELiExQDfVlYWx5BZTqy0v39TU6Gb0L69mS+qj9Bg5d4UylhREqSnOlKFjnGbyUf 9q9g== X-Gm-Message-State: ALyK8tIwIV7bUXafdj6C7ptz1mjv4iHRYyI37rsoYV8toQPouyWqeHAoYZ4aADlnrTYPWfHkZjtZO8X+v0A2vzkF X-Received: by 10.50.69.4 with SMTP id a4mr4491482igu.70.1464517970853; Sun, 29 May 2016 03:32:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.142.86 with HTTP; Sun, 29 May 2016 03:32:30 -0700 (PDT) In-Reply-To: References: From: Ashesh Vashi Date: Sun, 29 May 2016 16:02:30 +0530 Message-ID: Subject: Re: [PATCH] Tables node (pgAdmin4) To: Murtuza Zabuawala Cc: Thom Brown , pgadmin-hackers , Dave Page , Harshal Dhumal , Akshay Joshi Content-Type: multipart/alternative; boundary=047d7bfe9aba6ba3930533f8a9d1 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 --047d7bfe9aba6ba3930533f8a9d1 Content-Type: text/plain; charset=UTF-8 Committed - after rebased the patch. -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company *http://www.linkedin.com/in/asheshvashi* On Thu, May 26, 2016 at 4:41 PM, Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > PFA updated patch which will also include new query given by Thom for "Of > type" drop-down. > > > Regards, > Murtuza > > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > On Thu, May 26, 2016 at 4:04 PM, Thom Brown wrote: > >> On 26 May 2016 at 11:20, Murtuza Zabuawala < >> murtuza.zabuawala@enterprisedb.com> wrote: >> >>> Hi, >>> >>> PFA patch for RM#1231 & RM#1237. >>> >>> Additionally I have shifted 'Advanced tab' after columns & constraint >>> tab. >>> >>> >>> @Thom, >>> >>> Reading "Of type" drop-down, We borrowed sql query from pgadmin3 to >>> populate "Of type" combo box as given below. >>> I was not able to find a way to differentiate between table & composite >>> type populating from below given query, >>> I'll put in todo list, may be someone from community can help in future. >>> >>> SELECT t.oid, >>> quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typname >>> FROM pg_type t, pg_namespace n >>> WHERE t.typtype='c' AND t.typnamespace=n.oid >>> AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema') >>> ORDER BY typname; >>> >>> >> This should work: >> >> SELECT c.oid, >> quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname >> FROM pg_namespace n, pg_class c >> WHERE c.relkind = 'c' AND c.relnamespace=n.oid >> AND NOT (n.nspname like 'pg_%' OR n.nspname='information_schema') >> ORDER BY typname; >> >> Although, to avoid confusion, the "typname" alias should probably just be >> "relname". >> >> Thom >> > > --047d7bfe9aba6ba3930533f8a9d1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Committed - after rebased the patch.

= --

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<= /p>

<= br>

<= a href=3D"http://www.linkedin.com/in/asheshvashi" target=3D"_blank">http= ://www.linkedin.com/in/asheshvashi


On Thu, May 26, 2016 at 4:41 PM, Murtuza Zab= uawala <murtuza.zabuawala@enterprisedb.com>= wrote:
Hi,

PFA updated patch which will also include new query given by Thom fo= r "Of type" drop-down.


Re= gards,
Murtuza


-= -
Regards,
Murtuza Zabuawala<= br style=3D"color:rgb(136,136,136)">= EnterpriseDB:=C2=A0http://www.ente= rprisedb.com
The Enterprise PostgreSQL Company


On Thu, May 26= , 2016 at 4:04 PM, Thom Brown <thom@linux.com> wrote:
On 26 May 2016 at 11:20, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

PFA patch for = RM#1231 & RM#1237.

Additionally I have shifted= 'Advanced tab' after columns & constraint tab.

<= /div>

@Thom,

Reading "Of t= ype" drop-down, We borrowed sql query from pgadmin3 to populate "= Of type" combo box as given below.
I was not able to find a = way to differentiate between table & composite type populating from bel= ow given query, =C2=A0
I'll put in todo list, may be someone = from community can help in future.=C2=A0

SELECT t.oid,
= =C2=A0 quote_ident(n.nspname)||'.'||quote_ident(t.typname) AS typna= me
=C2=A0 FROM pg_type t, pg_names= pace n
WHERE t.typtype=3D'c= 9; AND t.typnamespace=3Dn.oid
=C2= =A0 AND NOT (n.nspname like 'pg_%' OR n.nspname=3D'information_= schema')
ORDER BY typname;


This should= work:

SELECT c.oid,
=C2=A0 quote_ident(n.nspname)||'.'||= quote_ident(c.relname) AS typname
=C2=A0 FROM pg_namespace n, pg_class c=
WHERE c.relkind =3D 'c' AND c.relnamespace=3Dn.oid
= =C2=A0 AND NOT (n.nspname like 'pg_%' OR n.nspname=3D'informati= on_schema')
ORDER BY typname;

Although, to avoid c= onfusion, the "typname" alias should probably just be "relna= me".
=C2=A0
Thom


--047d7bfe9aba6ba3930533f8a9d1--