Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4881 OpenMRS should support Postgresql
  3. TRUNK-5807

Exception thrown in console on saving Patient in PostgreSQL

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.4.0
    • None
    • None
    • Low

    Description

      Currently, if you try to save patient in PostgreSQL the patient gets saved successfully but an exception is thrown on console :  

      Caused by: org.postgresql.util.PSQLException: ERROR: column "this_.date_started" must appear in the GROUP BY clause or be used in an aggregate function
      {{ Position: 167}}
      {{ at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)}}
      {{ at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)}}
      {{ at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)}}
      {{ at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)}}
      {{ at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)}}
      {{ at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)}}
      {{ at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379)}}
      {{ at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:57)}}
      {{ ... 122 more "}}

      Resolve this issue. This does not happen in case of MySQL.

      Link to logs : https://pastebin.com/ujUy5fsB

      Gliffy Diagrams

        Attachments

          Activity

            People

              aman Aman Mishra
              aman Aman Mishra
              Daniel Kayiwa Daniel Kayiwa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: