相关疑难解决方法(0)

错误:运算符不存在:数字 ~* 未知

我需要domain在 PostgreSQL 中创建一个价格。价格必须是NUMERIC(9,2)9 为精度,2 为小数位数。尝试创建域时获取:

ERROR: operator does not exist: numeric ~* unknown Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.

询问:

CREATE DOMAIN d_price AS NUMERIC(9, 2) NOT NULL 
CONSTRAINT Product_price_can_contain_only_double_precision_value
CHECK(VALUE ~*'^(([[:digit:]])+\.([[:digit:]]){2})$');
Run Code Online (Sandbox Code Playgroud)

sql postgresql

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

postgresql ×1

sql ×1