Skip to content
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

make prepared statements work correctly #2

Open
mupat opened this issue Jun 7, 2016 · 0 comments
Open

make prepared statements work correctly #2

mupat opened this issue Jun 7, 2016 · 0 comments
Assignees

Comments

@mupat
Copy link

mupat commented Jun 7, 2016

before the query get saved the placeholder for the prepared statement should be replaced by the value. Otherwise postgres is failing with:

Job ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper (id=3597) FAILED (1 prior attempts) with ActionView::Template::Error: PG::ProtocolViolation: ERROR:  bind message supplies 0 parameters, but prepared statement "" requires 1

so for example for where clause:

where: '"investments"."project_id" = $1'

should be

where: '"investments"."project_id" = 2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants