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

Error when saving configuration to postgres #463

Closed
otterc opened this issue Jan 30, 2017 · 2 comments
Closed

Error when saving configuration to postgres #463

otterc opened this issue Jan 30, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@otterc
Copy link

otterc commented Jan 30, 2017

Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "user"
Position: 82
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:138) ~[postgresql-9.4.1211.jre7.jar!/:9.4.1211.jre7]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208) ~[hibernate-core-4.3.11.Final.jar!/:4.3.11.Final]

otterc pushed a commit to otterc/genie that referenced this issue Jan 30, 2017
@tgianos tgianos self-assigned this Jan 31, 2017
@tgianos tgianos added the bug label Jan 31, 2017
@tgianos tgianos added this to the 3.0.1 milestone Jan 31, 2017
@tgianos
Copy link
Contributor

tgianos commented Jan 31, 2017

Confirmed this is an issue with Postgres 3.0.0 schema and code. Unfortunately updating @Column definition to "\"user\"" solves the issue for Postgres but creates issues in other stores. It makes more sense at this point to fix this issue by renaming the column to genie_user instead of constantly fighting against reserved keywords and workarounds.

@tgianos
Copy link
Contributor

tgianos commented Feb 7, 2017

@otterc This issue should be fixed in release 3.0.1 with the new schema. I ran all the integration tests against both MySQL and PostgreSQL and everything passed. There are database upgrade scripts or entirely new schema files as well. I'll cherry-pick this into master as well so that the same fix will be in going forward.

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

2 participants