Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avhhI-000093-At for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Apr 2016 08:53:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1avhhH-0008Fr-U2 for pgadmin-hackers@arkaria.postgresql.org; Thu, 28 Apr 2016 08:53:19 +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 1avhh3-00080p-QS for pgadmin-hackers@postgresql.org; Thu, 28 Apr 2016 08:53:05 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1avhh0-0000lv-Ka for pgadmin-hackers@postgresql.org; Thu, 28 Apr 2016 08:53:04 +0000 Received: by mail-wm0-x22f.google.com with SMTP id g17so29301815wme.1 for ; Thu, 28 Apr 2016 01:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tVlj/NYCUalk2cSPiDx6tTCxkDQtKtrTbzomLOUifhU=; b=CtDefWxofBtRtDy0iPVCsuTwrRs6Ou19gt5dRbyvmf5Uj8Qybe9jDt4Dz3lKe/kQ44 XS148TQkfm8WA78HkUGCtIorBOCD1NHnOKRPXMg5bC3qd1B1Eodg7HGaTZRheXh2tX02 c2n1/V+Pr3AwC+7gs+JOmCtlef5vhm5f5dd0xcTOs8EL/M3VF8kdbcVgHhD+3vGOVZPx BwhZY2LkXQllgQ4rIvLuhTyw8hHeLVTPotWt0kOqdd6Qp2fYh1B6F9xvk5Nnb5tc1Xkk AF0QE0cakb6HG3cvoVcOBCJkr2UjqNZSMITUmXo/XYKt6InvY4yNqBkjAVgd1zuNmtjl sKXg== 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=tVlj/NYCUalk2cSPiDx6tTCxkDQtKtrTbzomLOUifhU=; b=FuDbUsqWXq9JXQ43aBFV+W8WsrY3nYszdCDHJK6L6kPvtoU2haGmY4q+OEFKVzO3jr FDYuxTBlgBkBHzPOuSR7OMebi8pOZKG/w2k7e+MHNIK5fj7WVE0S2SzO3A1LyzcJ/HMo d5i9RvYYk3A6npIC9O/58c6ULxccvn0VFUbyfFqvBAbBPgNiR7CLfHDmh7iiWzE5tUtZ P8/aK9izpcOQn5Nm8jF132hbsuyqYLY9c+OaBOJ7uB/YaEJAMUKwaZ0uxNu3E5cpQaXl 0hS7UOpN+TY6i2IIGdIK4yD35m0PsrV2ssikQKhWGysqIn+e4XYaXMp4QiwHkwxpjC/E ZRxA== X-Gm-Message-State: AOPr4FWHdfYA/2169Tl+KSTR19TqawSsz9I91GRTZcOGuDn8RWDYcITW9DjI4s0qXxTCpg== X-Received: by 10.28.126.145 with SMTP id z139mr28784594wmc.81.1461833580750; Thu, 28 Apr 2016 01:53:00 -0700 (PDT) Received: from [192.168.0.42] ([176.27.51.23]) by smtp.gmail.com with ESMTPSA id u12sm12858365wmu.12.2016.04.28.01.52.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 01:52:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] Tables node (pgAdmin4) From: Dave Page X-Mailer: iPad Mail (13E238) In-Reply-To: Date: Thu, 28 Apr 2016 09:52:59 +0100 Cc: Harshal Dhumal , pgadmin-hackers , Murtuza Zabuawala , Surinder Kumar , Arun Kollan Content-Transfer-Encoding: quoted-printable Message-Id: <921AFBF6-CB51-4898-B5F5-73CE38311399@pgadmin.org> References: To: Thom Brown 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 27 Apr 2016, at 13:43, Thom Brown wrote: >=20 > On 27 April 2016 at 10:22, Harshal Dhumal > wrote: >>=20 >> Hi, >>=20 >> PFA attached patches for table node and all table child nodes. >>=20 >> This patch includes below nodes, >>=20 >> 1) Table node -- Initial patch by Murtuza, = constraints compatibility by Harshal. >> 2) Column node -- by Murtuza. >> 3) Index node -- by Murtuza. >> 4) Trigger node -- by Murtuzz. >> 6) Rules node -- by Surinder. >> 7) Constraints nodes: >> i] Index Constraint -- Initial patch by Harshal, I= ntegration with table node by Murtuza. >> ii] Foreign key -- Initial patch and Integra= tion with table node by Harshal. >> iii] Check constraint -- Initial patch and Integrati= on with table node by Harshal. >> iv] Exclusion constraint -- Initial patch and Integration= with table node by Harshal. >>=20 >> Please apply patches in following order as all of them depends on each o= ther. >>=20 >> Order: Table Node ----> Index constraint ---> remaining patches in any = order. >=20 > Nice work. Here's some initial feedback from a very quick play around. >=20 > On the Create table editor, in the Advance tab (which should probably > be labelled "Advanced"), the Like section should grey out the "With *" > values if no relation is selected in the drop-down box. >=20 > The way primary keys are defined are kinda awkward. It might be > useful to provide some kind of checkbox on the initial column list > that tells it which columns are involved in the primary key, then the > user could just select which ones they want. If they want to refine > it, they could edit it in the Constraints > Primary Key section. If the design we did has been properly followed (I can't check right now), = then that's exactly how it should be working. Harshal? Arun Kollan and I spent a lot of time redesigning the table dialogue to mak= e it as quick and efficient to use as possible. There will likely be minor = deviations from that design to ensure consistency with the way other parts = of the app have turned out, but the basic principles should be there. >=20 > I'm getting weird spacing in the SQL output. Here's an example: >=20 > CREATE UNLOGGED TABLE public.test > ( > id integer COLLATE pg_catalog."de_DE.utf8" NOT NULL DEFAULT -1, > stuff text COLLATE pg_catalog."C.UTF-8" DEFAULT "hello", > CONSTRAINT pk PRIMARY KEY (id, stuff) WITH (FILLFACTOR=3D33) DEFERRABLE > ) > WITH ( > OIDS =3D TRUE, > FILLFACTOR =3D 88, > autovacuum_enabled =3D TRUE, > autovacuum_analyze_scale_factor =3D 0.33, > autovacuum_analyze_threshold =3D 30, > autovacuum_freeze_max_age =3D 3333333, > autovacuum_vacuum_cost_delay =3D 30, > autovacuum_vacuum_cost_limit =3D 3, > autovacuum_vacuum_scale_factor =3D 0.33, > autovacuum_vacuum_threshold =3D 33, > autovacuum_freeze_min_age =3D 3300000, > autovacuum_freeze_table_age =3D 333000000 > ) > TABLESPACE pg_default; >=20 > ALTER TABLE public.test > OWNER to thom; > GRANT ALL ON TABLE public.test TO thom; >=20 >=20 > COMMENT ON TABLE public.test > IS 'This is just a test table'; >=20 > COMMENT ON COLUMN public.test.id > IS 'the main ID'; >=20 > ALTER TABLE public.test > ALTER COLUMN id > SET (n_distinct=3D'0.2'); > COMMENT ON CONSTRAINT pk ON public.test > IS 'primary key test' >=20 > Note there are 2 blank lines after the GRANT ALL ON TABLE line, and > none before the COMMENT ON CONSTRAINT line. >=20 > This SQL fails because collations aren't allowed on integer columns, > and the DEFAULT value for the column named stuff doesn't quote it as a > string literal, so it's looking for a column called "hello". >=20 > There's also no way to view the autovacuum options I defined other > than the SQL pane. >=20 > Thom >=20 >=20 > --=20 > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgadmin-hackers --=20 Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers