postgresql字段默认设置当前时间
CREATE TABLE "public"."my_pg_table" (
"id" BIGSERIAL NOT NULL,
"content" VARCHAR NULL DEFAULT NULL,
"yesterday" DATE NOT NULL DEFAULT DATE(TIMEZONE('UTC-8'::TEXT, NOW())) - INTEGER '1',
"ts" TIMESTAMP NOT NULL DEFAULT TIMEZONE('UTC-8'::TEXT, NOW()::TIMESTAMP(0) WITHOUT TIME ZONE),
PRIMARY KEY ("id")
)
;