INSERT INTO tmp3 values (5,50);
 -- Try (and fail) to add constraint due to invalid source columns
 ALTER TABLE tmp3 add constraint tmpconstr foreign key(c) references tmp2 match full;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "c" referenced in foreign key constraint does not exist
 -- Try (and fail) to add constraint due to invalide destination columns explicitly given
 ALTER TABLE tmp3 add constraint tmpconstr foreign key(a) references tmp2(b) match full;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "b" referenced in foreign key constraint does not exist
 -- Try (and fail) to add constraint due to invalid data
 ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  insert or update on table "tmp3" violates foreign key constraint "tmpconstr"
 DETAIL:  Key (a)=(5) is not present in table "tmp2".
 -- Delete failing row
 DELETE FROM tmp3 where a=5;
 -- Try (and succeed)
 ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 -- Try (and fail) to create constraint from tmp5(a) to tmp4(a) - unique constraint on
 -- tmp4 is a,b
 ALTER TABLE tmp5 add constraint tmpconstr foreign key(a) references tmp4(a) match full;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  there is no unique constraint matching given keys for referenced table "tmp4"
 DROP TABLE tmp5;
 DROP TABLE tmp4;
 CREATE TEMP TABLE FKTABLE (ftest1 inet);
 -- This next should fail, because inet=int does not exist
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This should also fail for the same reason, but here we
 -- give the column name
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This should succeed, even though they are different types
 DROP TABLE FKTABLE;
 CREATE TEMP TABLE FKTABLE (ftest1 varchar);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 -- As should this
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 DROP TABLE pktable cascade;
 NOTICE:  drop cascades to constraint $2 on table fktable
 NOTICE:  drop cascades to constraint $1 on table fktable
 -- This should fail, because we just chose really odd types
 CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 DROP TABLE FKTABLE;
 CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
      references pktable(ptest1, ptest2);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 DROP TABLE FKTABLE;
 CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet);
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
      references pktable(ptest2, ptest1);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: integer = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- As does this...
 ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1)
      references pktable(ptest1, ptest2);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- temp tables should go away by themselves, need not drop them.
 create table atacc2 (id int4 unique);
 NOTICE:  CREATE TABLE / UNIQUE will create implicit index "atacc2_id_key" for table "atacc2"
 alter table atacc1 add foreign key (a) references atacc2(id);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "a" referenced in foreign key constraint does not exist
 alter table atacc1 add foreign key ("........pg.dropped.1........") references atacc2(id);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "........pg.dropped.1........" referenced in foreign key constraint does not exist
 alter table atacc2 add foreign key (id) references atacc1(a);
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "a" referenced in foreign key constraint does not exist
 alter table atacc2 add foreign key (id) references atacc1("........pg.dropped.1........");
-NOTICE:  ALTER TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "........pg.dropped.1........" referenced in foreign key constraint does not exist
 drop table atacc2;
 create index "testing_idx" on atacc1(a);
 
 CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE, ftest2 int );
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert test data into PKTABLE
 INSERT INTO PKTABLE VALUES (1, 'Test1');
 INSERT INTO PKTABLE VALUES (2, 'Test2');
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, CONSTRAINT constrname FOREIGN KEY(ftest1, ftest2) 
                        REFERENCES PKTABLE MATCH FULL ON DELETE SET NULL ON UPDATE SET NULL);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert test data into PKTABLE
 INSERT INTO PKTABLE VALUES (1, 2, 'Test1');
 INSERT INTO PKTABLE VALUES (1, 3, 'Test1-2');
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE ( ftest1 int DEFAULT -1, ftest2 int DEFAULT -2, ftest3 int, CONSTRAINT constrname2 FOREIGN KEY(ftest1, ftest2) 
                        REFERENCES PKTABLE MATCH FULL ON DELETE SET DEFAULT ON UPDATE SET DEFAULT);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert a value in PKTABLE for default
 INSERT INTO PKTABLE VALUES (-1, -2, 'The Default!');
 -- Insert test data into PKTABLE
 CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL, ftest2 int );
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert test data into PKTABLE
 INSERT INTO PKTABLE VALUES (1, 'Test1');
 INSERT INTO PKTABLE VALUES (2, 'Test2');
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int,  CONSTRAINT constrname3
            FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert Primary Key values
 INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
 INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
 CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int,  CONSTRAINT constrname3
            FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
            ON DELETE CASCADE ON UPDATE CASCADE);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert Primary Key values
 INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
 INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
 CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int, ftest3 int, ftest4 int,  CONSTRAINT constrname3
            FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
            ON DELETE SET DEFAULT ON UPDATE SET NULL);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert Primary Key values
 INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
 INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
 CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int DEFAULT -1, ftest3 int, ftest4 int,  CONSTRAINT constrname3
            FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
            ON DELETE SET NULL ON UPDATE SET DEFAULT);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- Insert Primary Key values
 INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
 INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
 CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 CREATE TABLE FKTABLE_FAIL1 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest2) REFERENCES PKTABLE);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "ftest2" referenced in foreign key constraint does not exist
 CREATE TABLE FKTABLE_FAIL2 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest1) REFERENCES PKTABLE(ptest2));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  column "ptest2" referenced in foreign key constraint does not exist
 DROP TABLE FKTABLE_FAIL1;
 ERROR:  table "fktable_fail1" does not exist
 CREATE TABLE PKTABLE (ptest1 int, ptest2 int, UNIQUE(ptest1, ptest2));
 NOTICE:  CREATE TABLE / UNIQUE will create implicit index "pktable_ptest1_key" for table "pktable"
 CREATE TABLE FKTABLE_FAIL1 (ftest1 int REFERENCES pktable(ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  there is no unique constraint matching given keys for referenced table "pktable"
 DROP TABLE FKTABLE_FAIL1;
 ERROR:  table "fktable_fail1" does not exist
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 -- This next should fail, because inet=int does not exist
 CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This should also fail for the same reason, but here we
 -- give the column name
 CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable(ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This should succeed, even though they are different types
 -- because varchar=int does exist
 CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE FKTABLE;
 -- As should this
 CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable(ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE FKTABLE;
 DROP TABLE PKTABLE;
 -- Two columns, two tables
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 -- This should fail, because we just chose really odd types
 CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- Again, so should this...
 CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This fails because we mixed up the column ordering
 CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- As does this...
 CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest1, ptest2));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- And again..
 CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest2, ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: integer = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- This works...
 CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest2, ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE FKTABLE;
 -- As does this
 CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE FKTABLE;
 DROP TABLE PKTABLE;
 -- Two columns, same table
 CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
 ptest4) REFERENCES pktable(ptest1, ptest2));
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE PKTABLE;
 -- And this, 
 CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
 ptest4) REFERENCES pktable);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 DROP TABLE PKTABLE;
 -- This shouldn't (mixed up columns)
 CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
 ptest4) REFERENCES pktable(ptest2, ptest1));
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: integer = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- Nor should this... (same reason, we have 4,3 referencing 1,2 which mismatches types
 CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4,
 ptest3) REFERENCES pktable(ptest1, ptest2));
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- Not this one either... Same as the last one except we didn't defined the columns being referenced.
 CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4,
 ptest3) REFERENCES pktable);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 --
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 NOTICE:  CREATE TABLE / UNIQUE will create implicit index "pktable_base1_key" for table "pktable"
 create table fktable (ftest1 int references pktable(base1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- now some ins, upd, del
 insert into pktable(base1) values (1);
 insert into pktable(base1) values (2);
 delete from pktable;
 -- Now 2 columns 2 tables, matching types
 create table fktable (ftest1 int, ftest2 int, foreign key(ftest1, ftest2) references pktable(base1, ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- now some ins, upd, del
 insert into pktable(base1, ptest1) values (1, 1);
 insert into pktable(base1, ptest1) values (2, 2);
 create table pktable(ptest1 int, ptest2 int, primary key(base1, ptest1), foreign key(base2, ptest2) references
                                              pktable(base1, ptest1)) inherits (pktable_base);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 insert into pktable (base1, ptest1, base2, ptest2) values (1, 1, 1, 1);
 insert into pktable (base1, ptest1, base2, ptest2) values (2, 1, 1, 1);
 insert into pktable (base1, ptest1, base2, ptest2) values (2, 2, 2, 1);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
 -- just generally bad types (with and without column references on the referenced table)
 create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable(base1, ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: cidr = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 -- let's mix up which columns reference which
 create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable);
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable(base1, ptest1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table fktable(ftest1 int, ftest2 inet, foreign key(ftest1, ftest2) references pktable(ptest1, base1));
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: integer = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 drop table pktable;
 create table pktable(ptest1 inet, ptest2 inet[], primary key(base1, ptest1), foreign key(base2, ptest2) references
                                              pktable(base1, ptest1)) inherits (pktable_base);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet[] = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(base2, ptest2) references
                                              pktable(ptest1, base1)) inherits (pktable_base);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: integer = inet
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references
                                              pktable(base1, ptest1)) inherits (pktable_base);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references
                                              pktable(base1, ptest1)) inherits (pktable_base);
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 ERROR:  operator does not exist: inet = integer
 HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts.
 drop table pktable;
    fk      INT4 REFERENCES pktable DEFERRABLE
 );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- default to immediate: should fail
 INSERT INTO fktable VALUES (5, 10);
 ERROR:  insert or update on table "fktable" violates foreign key constraint "$1"
    fk      INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED
 );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 -- default to deferred, should succeed
 BEGIN;
 INSERT INTO fktable VALUES (100, 200);
    fk      INT4 REFERENCES pktable DEFERRABLE
 );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 BEGIN;
 SET CONSTRAINTS ALL DEFERRED;
 -- should succeed, for now
    fk      INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED
 );
 NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE:  CREATE TABLE will create implicit triggers for foreign-key checks
 BEGIN;
 -- no error here
 INSERT INTO fktable VALUES (100, 200);