-
Notifications
You must be signed in to change notification settings - Fork 77
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
Are prepared statements supposed to bypass PARSE? #146
Comments
I'm also running in to this. Are prepared statements properly supported? |
The entry point for prepared vs unprepared statement is at: https://github.com/will/crystal-pg/blob/master/src/pg/connection.cr#L20-L26 . They are all unprepared under the hood. |
So this line should probably look more like |
Maybe. It depends on the underlying implementation or protocol. In mysql the binary and text protocol that are used for prepared or unprepared statements is very different. In sqlite all the statements are prepared. I don’t know about the internals of pg protocol. |
Maybe I'm doing something wrong here (or misunderstanding things) but this returns
true
:I then ran this:
I tailed the database log file and expected to see 1 parse followed by 10 sets of bind and execute with the first block, and 10 sets of parse, bind and execute with the second block. However, in both cases I see 10 sets of parse, bind and execute, so I'm wondering if I've misunderstood the purpose of
Connection#build
.I noticed #97 so I'm wondering why the pg driver returns
true
forConnection#prepared_statements?
?Thanks,
Steve
The text was updated successfully, but these errors were encountered: