public inbox for [email protected]  
help / color / mirror / Atom feed
From: Harshal Dhumal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: [PATCH] Tables node (pgAdmin4)
Date: Sat, 7 May 2016 19:33:49 +0530
Message-ID: <CAFiP3vwydBNGOeZUrwhvgPzj3zp0x4HMZPoELBJcesfgt0JKGw@mail.gmail.com> (raw)
In-Reply-To: <CAA-aLv5J_Zu-7+_+qbF6E76BjyZ_bXZi_Ei86Qngw6QKNJd_1g@mail.gmail.com>
References: <CAKKotZRCf07F_SGHi4KawBtLHPSeKz5Uvzwu6ddQ=bKc1FDRRw@mail.gmail.com>
	<CAFiP3vw61T0n--F4vYXALdtrkBKznBegBPq5Ds=6uZrg02vWXQ@mail.gmail.com>
	<CAA-aLv7fzZnxRhwV6umxhA-k52YekWyi7t1F34aPpUXR+41tjg@mail.gmail.com>
	<CAA-aLv4z0RcdDvYLtQFH1JgWH2pdPizW9Fa+XaOSTQYQgZeLzg@mail.gmail.com>
	<CAA-aLv5J_Zu-7+_+qbF6E76BjyZ_bXZi_Ei86Qngw6QKNJd_1g@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi,

PFA updated patches for table and it's child nodes.

Please apply patches in following order as all of them depends on each
other.




*Order:  Table Node ----> Index constraint ---> remaining patches in any
order.*

-- 
*Harshal Dhumal*
*Software Engineer *



EenterpriseDB <http://www.enterprisedb.com;

On Thu, Apr 28, 2016 at 2:14 PM, Thom Brown <[email protected]> wrote:

> On 27 April 2016 at 14:34, Thom Brown <[email protected]> wrote:
> > On 27 April 2016 at 13:43, Thom Brown <[email protected]> wrote:
> >> On 27 April 2016 at 10:22, Harshal Dhumal
> >> <[email protected]> wrote:
> >>>
> >>> Hi,
> >>>
> >>> PFA attached patches for table node and all table child nodes.
> >>>
> >>> This patch includes below nodes,
> >>>
> >>> 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, Integration with table node by Murtuza.
> >>>       ii] Foreign key                        -- Initial patch and
> Integration with table node by Harshal.
> >>>       iii] Check constraint                -- Initial patch and
> Integration with table node by Harshal.
> >>>       iv] Exclusion constraint           -- Initial patch and
> Integration with table node by Harshal.
> >>>
> >>> Please apply patches in following order as all of them depends on each
> other.
> >>>
> >>> Order:  Table Node ----> Index constraint ---> remaining patches in
> any order.
> >>>
> >>>
> >>
> >> Nice work.  Here's some initial feedback from a very quick play around.
> >>
> >> 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.
> >>
> >> 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.
> >>
> >> I'm getting weird spacing in the SQL output.  Here's an example:
> >>
> >> 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=33)
> DEFERRABLE
> >> )
> >> WITH (
> >>     OIDS = TRUE,
> >>     FILLFACTOR = 88,
> >>     autovacuum_enabled = TRUE,
> >>     autovacuum_analyze_scale_factor = 0.33,
> >>     autovacuum_analyze_threshold = 30,
> >>     autovacuum_freeze_max_age = 3333333,
> >>     autovacuum_vacuum_cost_delay = 30,
> >>     autovacuum_vacuum_cost_limit = 3,
> >>     autovacuum_vacuum_scale_factor = 0.33,
> >>     autovacuum_vacuum_threshold = 33,
> >>     autovacuum_freeze_min_age = 3300000,
> >>     autovacuum_freeze_table_age = 333000000
> >> )
> >> TABLESPACE pg_default;
> >>
> >> ALTER TABLE public.test
> >>     OWNER to thom;
> >> GRANT ALL ON TABLE public.test TO thom;
> >>
> >>
> >> COMMENT ON TABLE public.test
> >>     IS 'This is just a test table';
> >>
> >> COMMENT ON COLUMN public.test.id
> >>     IS 'the main ID';
> >>
> >> ALTER TABLE public.test
> >>     ALTER COLUMN id
> >>     SET (n_distinct='0.2');
> >> COMMENT ON CONSTRAINT pk ON public.test
> >>     IS 'primary key test'
> >>
> >> Note there are 2 blank lines after the GRANT ALL ON TABLE line, and
> >> none before the COMMENT ON CONSTRAINT line.
> >>
> >> 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".
> >>
> >> There's also no way to view the autovacuum options I defined other
> >> than the SQL pane.
> >
> > A couple more:
> >
> > If I go to create a new table, give it a name, select a table to
> > inherit from, and then do nothing else, I get an error:
> >
> > ERROR: syntax error at or near "INHERITS"
> > LINE 2: INHERITS (test)
> > ^
> >
> > This is because no column list was provided, and in this case, an
> > empty one would be needed.  So instead of:
> >
> > CREATE TABLE public.test2
> > (
> > )
> >     INHERITS (test)
> > WITH (
> >     OIDS = FALSE
> > )
> > TABLESPACE pg_default;
> >
> > It should be:
> >
> > CREATE TABLE public.test2
> >     INHERITS (test)
> > WITH (
> >     OIDS = FALSE
> > )
> > TABLESPACE pg_default;
>
> Correction, these should be the other way around.
>
> Thom
>


-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Attachments:

  [application/zip] table_7_May_V3.patch.zip (82.5K, 3-table_7_May_V3.patch.zip)
  download

  [application/zip] index_constraint_7_May_V3.patch.zip (13.1K, 4-index_constraint_7_May_V3.patch.zip)
  download

  [application/zip] foreign_key_7_May_V3.patch.zip (16.0K, 5-foreign_key_7_May_V3.patch.zip)
  download

  [application/zip] check_constraint_7_May_V3.patch.zip (9.3K, 6-check_constraint_7_May_V3.patch.zip)
  download

  [application/zip] exclusion_constraint_7_May_V3.patch.zip (14.5K, 7-exclusion_constraint_7_May_V3.patch.zip)
  download

view thread (49+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH] Tables node (pgAdmin4)
  In-Reply-To: <CAFiP3vwydBNGOeZUrwhvgPzj3zp0x4HMZPoELBJcesfgt0JKGw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox