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

Executing a non-root query with manual input throws exception with PostgreSQL #8

Open
krpors opened this issue Jul 18, 2020 · 1 comment
Assignees
Labels

Comments

@krpors
Copy link
Owner

krpors commented Jul 18, 2020

See title. When connecting to a PostgreSQL database and executing a non-root query (with some manual input), an exception gets thrown.

@krpors krpors self-assigned this Jul 18, 2020
@krpors krpors added the bug label Jul 18, 2020
@krpors
Copy link
Owner Author

krpors commented Aug 11, 2020

Stack trace follows:

ERROR: operator does not exist: integer = character varying
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
  Position: 42

Source query:

select * from permit_type pt where pt.id = :permit_type_id;

Named parameters given:

	permit_type_id = 5

Stacktrace:

org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = character varying
  Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
  Position: 42
	at postgresql@42.2.14.jre7/org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
	at postgresql@42.2.14.jre7/org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
	at postgresql@42.2.14.jre7/org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
	at postgresql@42.2.14.jre7/org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
	at postgresql@42.2.14.jre7/org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
	at postgresql@42.2.14.jre7/org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153)
	at postgresql@42.2.14.jre7/org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:103)
	at gimlet/cruft.wtf.gimlet.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:55)
	at gimlet/cruft.wtf.gimlet.jdbc.task.QueryTask.call(QueryTask.java:110)
	at gimlet/cruft.wtf.gimlet.jdbc.task.QueryTask.call(QueryTask.java:21)
	at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.base/java.lang.Thread.run(Thread.java:834)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant