wgliang / pgproxy

PostgreSQL proxy server.
Apache License 2.0
212 stars 37 forks source link

No queries are working, getting SQL syntax error at end of SQL string. #4

Open ghost opened 5 years ago

ghost commented 5 years ago

Any query I do through the proxy I get these types of error messages:

E0916 07:55:03.587681 16435 filter.go:42] syntax error at position 36 E0916 07:55:03.588476 16435 proxy.go:107] Connection #002 Do not meet the rules of the sql statement (SELECT * FROM pg_catalog.pg_tables;

As you can see it's a pretty simple select statement, I do notice that it adds a ( at the beginning of the select, on other systems it tacks on ! or #, not sure if we have a locale problem or not? My systems are on UTF-8.

Using Postgresql version 9.2.24 as source DB and psql client as the connecting client through proxy.

demidafonichev commented 3 years ago

@jcpuzic it seems like select * queries are not allowed https://github.com/wgliang/pgproxy/blob/e19ae27c28d7d454fad8c80f2f72aca5633a42e3/parser/filter.go#L65