-
Notifications
You must be signed in to change notification settings - Fork 92
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
Query errors with riverdatabasesql, Bun, and pgdriver #655
Comments
@NathanBaulch I’m not sure how this could have slipped past our testing 🤔 can you confirm that you’re using the dbsql driver, as well as the underlying db driver you’re using (pgx or other)? |
OK, that was a bit of a rabbit hole but it turns out the bun sql driver my project uses doesn't prepare statements before execution (for alleged perf reasons). That step is required in order to infer that the Is there any interest in supporting non-prepare-ing drivers? I'd be happy to send a PR that replaces |
Ah, it seems like you're using Bun's own pgdriver which I don't think we've tried, so it seems likely to be an issue specific to that. We have a fair bit of test coverage for the drivers including the Have you tried Bun with pgx, or is that not an option for some reason? |
I've switched to pgx for now, hopefully no side effects in my project! I guess this issue can serve as a warning to other Bun users. |
I'm completely new to River and immediately ran into the following issue when playing with the examples against Pg 16.4:
The offending
LeaderAttemptElect
SQL is attempting to cast an integertime.Duration
parameter into a Pginterval
which is not allowed. Weird that nobody else appears to have hit the same issue, I wonder where I've gone wrong!?Anyway, I'm currently working around this by patching all 4 instances of
now() + $2
in the river source withnow() + make_interval(secs => $2)
, as recommended in this issue: sqlc-dev/sqlc#429 (comment)The text was updated successfully, but these errors were encountered: