clear markdown feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3364508 fiddles created (36241 in the last week).

select version();
version
PostgreSQL 12.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit
 hidden batch(es)


CREATE TABLE foo (x SMALLINT PRIMARY KEY);
 hidden batch(es)


CREATE TABLE bar (y INT, CONSTRAINT y_fk_x FOREIGN KEY (y) REFERENCES foo (x));
 hidden batch(es)