New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handling colums names containing spaces #1008
Comments
Same problem with "." in column name http://127.0.0.1:3000/vulns_details?pluginattributes.vuln_information.cpe=like.*microsoft* pluginattributes.vuln_information.cpe is the column name, condition is never triggered.. |
This may not be suitable for others, but in my use case I've got a workaround for now.
The query I'm using is as follows:- |
✔️ reproduced: create table "fun times" as select generate_series(1,10) as "fun column"; # this one works
curl "localhost:3000/fun%20times"
# this one does not
curl "localhost:3000/fun%20times?select=fun%20column" {
"hint":null,
"details":null,
"code":"42703",
"message":"column fun times.fun does not exist"
} |
Below is an example of the SQL I'm trying to get via the API
psql -d -c "select "cHostname","Server Model" from "Server Today" where "cHostname" ilike '%nim%';"
cHostname | Server Model
------------+-------------------------
argnim1 | IBM,9113-550 (P5-550)
argnim2 | IBM,9113-550 (P5-550)
daaa2nim71 | IBM,9131-52A (P5-52A)
daah3nim71 | IBM,8406-71Y (P7-PS701)
hbnim1 | IBM,9133-55A (P5-55A)
(5 rows)
Some examples of what I get when I've tried using curl, as per the chat room the table name syntax seems to work fine with %20, but not for columns.
curl 'http://:3000/Server%20Today?select=cHostname&cHostname=ilike.nim'; echo ""
[{"cHostname":"argnim1"},{"cHostname":"argnim2"},{"cHostname":"daaa2nim71"},{"cHostname":"daah3nim71"},{"cHostname":"hbnim1"}]
curl 'http://:3000/Server%20Today?select=cHostname,Server%20Model&cHostname=ilike.nim'; echo ""
{"hint":"Perhaps you meant to reference the column "Server Today.MQ Server".","details":null,"code":"42703","message":"column Server Today.Server does not exist"}
curl 'http://:3000/Server%20Today?select=cHostname,"Server Model"&cHostname=ilike.nim'; echo ""
Bad Request
The text was updated successfully, but these errors were encountered: