获取绑定消息提供了2个参数,但当尝试从nodejs应用程序运行postgresql查询时,准备好的语句"“需要0错误,但在pg管理中也是如此
下面提到了我正在尝试运行的查询:
query="select array_agg(区域名称) from bitargetstg.tax_program_zones where coalesce(SHAPE_Area,0) >0 and (ST_Contains(ST_GeomFromEWKT(几何),"+
"ST_GeomFromText('POINT($1 $2)'))或ST_intersects(ST_GeomFromEWKT(几何),ST_GeomFromText('POINT($1 $2)‘)“;
发布于 2021-03-24 23:21:03
字符串字面量中没有参数替换,因此$1和$2是按字面意思处理的。
https://stackoverflow.com/questions/66782922
复制相似问题