On Tue, Mar 28, 2017 at 6:50 AM, Amit Langote <langote_amit...@lab.ntt.co.jp> wrote: >> Isn't it bogus that this is generating ALTER TABLE .. SET NOT NULL >> columns at all? You didn't say anything like that when setting up the >> database, so why should it be there when dumping? > > So we should find a way for the NOT NULL constraints added for the range > partition key columns to not be emitted *separately*? Like when a table > has primary key: > > -- > -- Name: foo; Type: TABLE; Schema: public; Owner: amit > -- > > CREATE TABLE foo ( > a integer NOT NULL > ); > > > ALTER TABLE foo OWNER TO amit; > > -- > -- Name: foo foo_pkey; Type: CONSTRAINT; Schema: public; Owner: amit > -- > > ALTER TABLE ONLY foo > ADD CONSTRAINT foo_pkey PRIMARY KEY (a); > > The NOT NULL constraint is emitted with CREATE TABLE, not separately.
Hmm, that's not exactly what I was thinking, but I think what I was thinking was wrong, so, yes, can we do what you said? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers