[CDO] Case in schema name with PostgreSQL [message #1745414] |
Mon, 10 October 2016 13:34 |
Cyril Chevé Messages: 14 Registered: October 2016 |
Junior Member |
|
|
Hi,
I am trying to use CDO with PostgreSQL. I have a specific need : I would like to use 1 PostgreSQL database but with N schemas (one CDO repository per schema).
So I have configured my CDO repositories like this:
<repository name="repository1">
...
<store type="db">
...
<dbAdapter name="postgresql"/>
<dataSource class="org.postgresql.ds.PGSimpleDataSource"
serverName="localhost"
portNumber="5432"
databaseName="Database"
user="test"
password="test"
currentSchema=" repository1"/>
</store>
</repository>
"currentSchema" is a specific parameter for PostgreSQL.
In the PostgreSQL database, I have created the N schemas.
When I launch the CDO server, I have the error: "the relation « cdo_branches » doesn't exist".
I have debugged the start of the CDO server and I have found, in the readSchema method (in DBAdapter.java) that the searched schema name is "REPOSITORY1" (the repository name in upper case) whereas the schema names, found in the database, are in lower case (it seems to be a choice of PostgreSQL developers).
It seems strange to me that the test to find the schema in the database depends on the case whereas the repository name is put in upper case to be the searched schema.
Is this behavior a choice or is it a bug ?
Regards,
Cyril
|
|
|
Powered by
FUDForum. Page generated in 0.02210 seconds