-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: support placeholders in logictest #3854
Comments
I think |
Agreed. On Thu, Jan 14, 2016 at 2:01 PM, Peter Mattis notifications@github.com
|
wouldn't the testdata format be much simpler to do vast coverage of things? it shouldn't be too complicated to make the logictest handle these. |
In #3819, we've discovered that some commands can fail when the extended query protocol is used, but fail with the simple query protocol used in the logic tests. To make sure we've fixed all of these we need to make sure that all statement types are covered by tests that use placeholders. We'd be more likely to have comprehensive test coverage of placeholder usage if they could be written in the more familiar logic test format, although I'm not sure if that justifies the complexity of all the parsing and reflection that would be required. |
As of #4037, there are many tests in pgwire_test.go to test placeholders. Are these suffient? |
I'm not convinced about adding something logic-test specific to support placeholders, but adding support for |
I'll add my 2 cents - AFAICT pgwire_test has some limitations which makes a lot of things hard to test:
If we do not go the logic test route and pgwire_test has to suffice, then we should fix these limitations. |
I'm in favor of fixing all of the limitations listed by Radu in pgwire_test and leaving the logic tests alone. |
+1 to fixing limitations in pgwire_test and leaving logic tests alone. trying to do the correct thing with respect to types in logic tests won't be possible without heavyweight additions to the syntax to support type annotations. |
Doesn't sound like anyone's rushing to do this, and the PREPARE/EXECUTE/RELEASE work is tracked in #7123. |
We really don't test placeholders very much, and I'm running into a lot of issues with them when changing out sql shell to the
postgres
driver.We should probably add support for those in the logic tests.
The tedious part is handling all types. We could do something similar to the
query <col types>
statement.The text was updated successfully, but these errors were encountered: