Postgresql postgrest post请求-为传入原始sql的字符串获取错误
如果在sql查询中使用任何字符串文字,则原始sql将出现错误Postgresql postgrest post请求-为传入原始sql的字符串获取错误,postgresql,postgresql-9.1,postgresql-9.3,postgrest,Postgresql,Postgresql 9.1,Postgresql 9.3,Postgrest,如果在sql查询中使用任何字符串文字,则原始sql将出现错误 http://localhost:3000/db/test { "sql": "select * from party where party_name='xxx' " } error: {"length":92,"name":"error","severity":"ERROR","code":"42703","position":"40","file":"parse_expr.c","line":"768","routine":
http://localhost:3000/db/test
{
"sql": "select * from party where party_name='xxx' "
}
error:
{"length":92,"name":"error","severity":"ERROR","code":"42703","position":"40","file":"parse_expr.c","line":"768","routine":"transformColumnRef"}
but the request with integer working fine..ex:
http://localhost:3000/db/test
{
"sql": "select * from party where id=1"
}
我认为您的查询有误。请再次检查您的查询检查出:。错误代码42703表示未定义_列,因此列party_名称可能不存在exist@Tommaso:在psql控制台中执行时,相同的查询返回结果。当postgresql http server现在使用rest api时,出现了这个问题