EagleOne Asked: 2014-12-31 09:21:10 +0800 CST2014-12-31 09:21:10 +0800 CST 2014-12-31 09:21:10 +0800 CST PostgreSQL 日期检查约束 772 如何在 PostgreSQL 中为 Date 类型添加 Check-costraint? 例如, CHECK 'DateXYZ>01/02/98' 需要类型转换吗? postgresql date 1 个回答 Voted Best Answer a_horse_with_no_name 2014-12-31T09:55:08+08:002014-12-31T09:55:08+08:00 create table foo ( some_date date not null check (some_date > date '1998-02-01'); ); 手册中的更多详细信息: http://www.postgresql.org/docs/current/static/datatype-datetime.html http://www.postgresql.org/docs/current/static/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS
手册中的更多详细信息: