Hi James,
Thanks for replying to my query.
It turns out that database is not the issue. I can connect to the same database from a docker instance of Hapi FHIR running locally on my computer and it works just fine.
The issue according to ChatGPT is that the Azure hosted container app is generating sql statements which are not correct for Postgres. It somehow thinks that it is talking to h2 or MS SQL Server.
ChatGPT: "The SQL select next value for seq_search is valid for databases like H2 or SQL Server, but PostgreSQL uses a different syntax: SELECT nextval('seq_search').
"
It then had me define a few additional env variables but still I am having the same problem.
SPRING_JPA_PROPERTIES_HIBERNATE_USE_NEW_ID_GENERATOR_MAPPINGS=true
HAPI_DB_SEQUENCE_FORMAT=SELECT nextval('%s')
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT=ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect