I want to create a new table that following code below;
create table dwh.dim_produk (
sk_produk serial primary key,
kode_produk varchar(25),
nama_produk varchar(50),
kode_kategori varchar(50),
nama_kategori varchar(50),
date_from date not null default current_timestamp,
date_to date not null default '12/31/9999');
but i get result such as;
SQL Error [22008]: ERROR: date/time field value out of range: "12/31/9999"
Hint: Perhaps you need a different "datestyle" setting.
Position: 253
thank in advance
9999-12-31make_date(year => 9999, month => 12, day => 31)datestylesetting. Inpsqldoshow datestyle. You have one that has aDMYordering so the31in the string is out of range. Change the value to31/12/999and it will work.