ITPub博客

首页 > 数据库 > PostgreSQL > PSQLexception: ERROR : type "signed" does not exist

PSQLexception: ERROR : type "signed" does not exist

原创 PostgreSQL 作者:哎呀我的天呐 时间:2022-08-04 11:49:42 0 删除 编辑

signed是MySQL特有的类型,Oracle和原生PostgreSQL都没有,当MySQL的代码有select cast( '1' as signed);跑在当前没有兼容类型的数据库上会报错

lightdb@postgres=# select cast('1' as signed);
ERROR:  type "signed" does not exist
LINE 1: select cast('1' as signed);
                            ^
lightdb@postgres=# create domain public.signed as bigint;
CREATE DOMAIN
lightdb@postgres=# select cast('1' as signed);
 signed 
--------
      1
(1 row)


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-2908954/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
https://cloud.tencent.com/developer/inventory/14362

注册时间:2014-10-30

  • 博文量
    403
  • 访问量
    2528886