Skip to content

Conversation

@serac
Copy link

@serac serac commented Sep 25, 2025

When quoting behavior is indicated, all schema objects should be quoted including table names.

@serac
Copy link
Author

serac commented Sep 25, 2025

Some additional context: we are modeling an Oracle database with a PostgreSQL database where we need to use uppercase table and column names. The use of the quoting facility is needed to satisfy this case, and our patch here fixed our failing integration test. Our connector configuration if it helps:

<icfc:configurationProperties
  xmlns:cfg="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-databasetable/org.identityconnectors.databasetable.DatabaseTableConnector">
  <cfg:host>BANNER_DB_HOST</cfg:host>
  <cfg:port>BANNER_DB_PORT</cfg:port>
  <cfg:user>sa_midpoint</cfg:user>
  <cfg:password>
    <t:clearValue>BANNER_DB_PASSWORD</t:clearValue>
  </cfg:password>
  <cfg:database>BANNER_DATABASE</cfg:database>
  <cfg:table>PZRPAGE</cfg:table>
  <cfg:keyColumn>PZRPAGE_PG_ID</cfg:keyColumn>
  <cfg:jdbcDriver>BANNER_JDBC_DRIVER</cfg:jdbcDriver>
  <cfg:jdbcUrlTemplate>BANNER_JDBC_URL_TEMPLATE</cfg:jdbcUrlTemplate>
  <cfg:enableEmptyString>false</cfg:enableEmptyString>
  <cfg:quoting>double</cfg:quoting>
  <cfg:rethrowAllSQLExceptions>true</cfg:rethrowAllSQLExceptions>
  <cfg:nativeTimestamps>BANNER_NATIVE_TIMESTAMPS</cfg:nativeTimestamps>
  <cfg:allNative>true</cfg:allNative>
  <cfg:changeLogColumn>PZRPAGE_ACTIVITY_DATE</cfg:changeLogColumn>
  <cfg:validConnectionQuery>select 1 from "PZRPAGE" where 1=0</cfg:validConnectionQuery>
  <!--SQLStateExceptionHandling is by default deactivated, we need to set it to true-->
  <cfg:SQLStateExceptionHandling>true</cfg:SQLStateExceptionHandling>
  <!-- Collection of values representing SQL state codes which can be interpreted to create an AlreadyExists exception -->
  <cfg:SQLStateAlreadyExists>23000</cfg:SQLStateAlreadyExists>
  <cfg:alreadyExistMessages>Duplicate key value violates unique constraint, already exists</cfg:alreadyExistMessages>
  <!-- Collection of values representing SQL state codes which can be interpreted to create an ConnectionFailed exception -->
  <cfg:SQLStateConnectionFailed>08000</cfg:SQLStateConnectionFailed>
  <!-- Collection of values representing SQL state codes which can be interpreted to create an InvalidAttributeValue exception -->
  <cfg:SQLStateInvalidAttributeValue>22000</cfg:SQLStateInvalidAttributeValue>
  <!-- Collection of values representing SQL state codes which can be interpreted to create an Configuration exception. -->
  <cfg:SQLStateConfigurationException>0A000</cfg:SQLStateConfigurationException>
  <icfc:resultsHandlerConfiguration>
  <icfc:enableNormalizingResultsHandler>false</icfc:enableNormalizingResultsHandler>
  <icfc:enableFilteredResultsHandler>false</icfc:enableFilteredResultsHandler>
  <icfc:enableAttributesToGetSearchResultsHandler>false</icfc:enableAttributesToGetSearchResultsHandler>
</icfc:resultsHandlerConfiguration>

When quoting behavior is indicated, all schema objects should be
quoted including table names.
@serac serac force-pushed the database-table-quote-fix branch from 7123218 to e01d86d Compare September 25, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant