Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b5Lm8-0003mU-EP for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 May 2016 23:30:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b5Lm7-0005s8-TO for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 May 2016 23:30:11 +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 1b5Llu-0005bZ-GT for pgadmin-hackers@postgresql.org; Tue, 24 May 2016 23:29:58 +0000 Received: from mail-vk0-x243.google.com ([2607:f8b0:400c:c05::243]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b5Llr-00068T-6v for pgadmin-hackers@postgresql.org; Tue, 24 May 2016 23:29:57 +0000 Received: by mail-vk0-x243.google.com with SMTP id y2so5382780vka.0 for ; Tue, 24 May 2016 16:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lTh8JJvBnG1MvwIK8yWk6SY8IK7S+NWw4OCxRvLcN38=; b=twZGVkn2qyew+gPkmAFRx3WeHZ3/WP6ERcQjdQ6ILYrHlOQWFqqNCDH+Oc4cpbx5aE /W24fcLtKYFAmQ5iNP/nPa6TJ97sG8isudD0nyuH8MLsPF2X/xHECym3Ha/IICuphAti hV1h6/zfDyofM25WU+ChKQZWcmCj01zcuary8Pz2Q3f4Vl6w4ZZe8zh7GPjRIwDkicmt /mxIEX8lvB+rXCe+jGOIOqhrmPZbhRF2tL48CRAgH+tHplfRuqqjdbvd/ktUnvoVO1Qs uWtC6dwIkAnZfx5EdxbsYzcMeB8jvzd9ljzg26v6/ST5xLsXdVbV0khT5Vda6V4c7Qsj QtQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lTh8JJvBnG1MvwIK8yWk6SY8IK7S+NWw4OCxRvLcN38=; b=WXoOHUV7d9/xT2L/m81WV/OjyEi7Uu/EWTPONqwAmpcFAkfmo6TF5FClEOFkjszEEH +FjSa3gH9c1KJJaJbl8xdbU2GemvXIsfbGl5Vp8RYTAxF1eF/ll20I/FvxGdHhRSCMNx cRZ7+O/0N5f82yGo7Ks+aRnlw4GVYAlP+UdCtlgbl032+IeKWIVX/UaFZ9seK5jGvQGo +0S9YSGgkIIziKCmBHYAy7ATxYl8gxuPuKdJxQiWosETX/F6hYSHBbbvJHDVDLgrZzoY 31TUXAH0tZ1/bhL8IiFk4MTutbi/xbMN0KGylbdF2QJ0ldCysHxTbJL2+hlcqEtvgQqQ Li3Q== X-Gm-Message-State: ALyK8tJWQdyMBVdLGaVsv/fuaz659m2qte26pZdWd0slSKLjpVn/ko9i7pPzeVisWQ4lfiPzQnoXr0+DGKty+g== X-Received: by 10.176.65.1 with SMTP id j1mr522269uad.112.1464132593963; Tue, 24 May 2016 16:29:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.2.239 with HTTP; Tue, 24 May 2016 16:29:24 -0700 (PDT) In-Reply-To: References: From: Thom Brown Date: Wed, 25 May 2016 00:29:24 +0100 X-Google-Sender-Auth: LegL-2P7v1j-JrqwtUQA7boablY Message-ID: Subject: Re: [PATCH] Tables node (pgAdmin4) To: Ashesh Vashi Cc: Murtuza Zabuawala , Dave Page , Akshay Joshi , Harshal Dhumal , pgadmin-hackers Content-Type: multipart/alternative; boundary=94eb2c1246502ada7805339eef6e X-Pg-Spam-Score: -2.4 (--) 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 --94eb2c1246502ada7805339eef6e Content-Type: text/plain; charset=UTF-8 On 24 May 2016 at 19:09, Ashesh Vashi wrote: > On Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala < > murtuza.zabuawala@enterprisedb.com> wrote: > >> Hi, >> >> PFA patch, which will fixes below mentioned issues, >> > Committed. > In the Create Table dialog, on the Advanced tab, the "Of type" drop-down lists tables and composite types, but those are supposed to just be composite types. Also, when using OF in CREATE TABLE, LIKE is no longer valid, so LIKE should be disabled when using OF. Also, there should probably be a way of setting options for the columns taken from the composite type. For example: CREATE TYPE inventory AS (product_id bigint, product_name text, weight numeric); CREATE TABLE stock OF inventory ( PRIMARY KEY (product_id), weight WITH OPTIONS DEFAULT 0 ); There's currently no way of doing this (neither the primary key, nor the default value for any columns). It should probably automatically populate the columns from the composite type on the columns tab. Also, could the generated SQL have an empty line between each statement? Thanks Thom --94eb2c1246502ada7805339eef6e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 2= 4 May 2016 at 19:09, Ashesh Vashi <ashesh.vashi@enterprisedb.c= om> wrote:
<= div dir=3D"ltr">

O= n Mon, May 23, 2016 at 6:35 PM, Murtuza Zabuawala <murtuz= a.zabuawala@enterprisedb.com> wrote:

Hi,

PFA patch, which will fixes below mentioned issues,
Committed.

In the Create Table dialog, on the Ad= vanced tab, the "Of type" drop-down lists tables and composite ty= pes, but those are supposed to just be composite types.

Also, when using OF in CREATE TABLE, LIKE is no longer= valid, so LIKE should be disabled when using OF.=C2=A0 Also, there should = probably be a way of setting options for the columns taken from the composi= te type.=C2=A0 For example:

CREATE TYPE inventory AS (product_id big= int, product_name text, weight numeric);

CREATE TABLE stock OF inven= tory (
=C2=A0=C2=A0=C2=A0 PRIMARY KEY (product_id),
=C2=A0=C2=A0=C2= =A0 weight WITH OPTIONS DEFAULT 0
);

There's currently no way of doing this (neither the primary key, n= or the default value for any columns).=C2=A0 It should probably automatical= ly populate the columns from the composite type on the columns tab.

=
Also, could the generated SQL have an empt= y line between each statement?

Thanks

Thom
--94eb2c1246502ada7805339eef6e--