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

SELECT typname, typnamespace::regnamespace, typdefaultbin, typdefault FROM pg_type WHERE typdefaultbin IS NOT NULL OR typdefault IS NOT NULL;
typname typnamespace typdefaultbin typdefault
time_stamp information_schema {FUNCEXPR :funcid 1967 :funcresulttype 1184 :funcretset false :funcvariadic false :funcformat 1 :funccollid 0 :inputcollid 0 :args ({COERCEVIAIO :arg {CONST :consttype 25 :consttypmod -1 :constcollid 100 :constlen -1 :constbyval false :constisnull false :location -1 :constvalue 7 [ 28 0 0 0 110 111 119 ]} :resulttype 1184 :resultcollid 0 :coerceformat 2 :location 105} {CONST :consttype 23 :consttypmod -1 :constcollid 0 :constlen 4 :constbyval true :constisnull false :location -1 :constvalue 4 [ 2 0 0 0 0 0 0 0 ]}) :location 105} ('now'::text)::timestamp(2) with time zone
 hidden batch(es)


CREATE DOMAIN text_x AS TEXT DEFAULT 'X'; CREATE TABLE tbl1 ( id int , col_without_default text_x , col_with_default text_x DEFAULT NULL); CREATE TABLE tbl2 ( id int , col_without_default information_schema.time_stamp , col_with_default information_schema.time_stamp DEFAULT NULL);
 hidden batch(es)


INSERT INTO tbl1(id) VALUES (1) RETURNING *;
id col_without_default col_with_default
1 X
 hidden batch(es)


INSERT INTO tbl2(id) VALUES (1) RETURNING *;
id col_without_default col_with_default
1 2020-06-02 13:02:58.93+01
 hidden batch(es)