【问题描述】
在SequoiaSQL-PostgresSQL中使用prepare,date 日期转换时产生WARNING,是否是图中的语法出现了问题?语法如下所示:
prepare test_p(text) as select last_trad_date from it_o_nosql where clnd_date=date($1) and mkt_type='2' and sec_vart = 'A';
PREPARE
allmart=# execute test_p('2019-04-10')
WARNING: unsupport argument type:type=322
WARNING: unsupport argument type:type=322
last_trad_date
----------------
2019-04-10
(1 row)
prepare test_p(text) as select last_trad_date from it_o_nosql where clnd_date=date('2019-04-10') and mkt_type='2' and sec_vart = 'A';
last_trad_date
----------------
2019-04-10
(1 row)
【解决办法】
图中执行语句date参数是以函数形式给出的,目前最新版本(SequoiaSQL-PostgreSQL 3.2)暂不支持以函数形式传递参数。