postgrest post request -Getting raw sql中传递字符串的错误

时间:2015-02-16 12:48:20

标签: 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":"transformColumnRef"}

but the request with integer working fine..ex:
http://localhost:3000/db/test
{
"sql": "select * from party where id=1"
}

0 个答案:

没有答案