Package org.springframework.jdbc.core.metadata

# Class PostgresTableMetaDataProvider

java.lang.Object
org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider
org.springframework.jdbc.core.metadata.PostgresTableMetaDataProvider

All Implemented Interfaces:
  `TableMetaDataProvider`

public class PostgresTableMetaDataProvider extends GenericTableMetaDataProvider
The PostgreSQL specific implementation of `TableMetaDataProvider`. Supports a feature for retrieving generated keys without the JDBC 3.0 `getGeneratedKeys` support.

Since:
  2.5
Author:
  Thomas Risberg

## Field Summary

### Fields inherited from class org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider

`logger`

## Constructor Summary

Constructors
Constructor
Description
`PostgresTableMetaDataProvider(DatabaseMetaData databaseMetaData)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName)`
Get the simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported.
`boolean`
`isGetGeneratedKeysSimulated()`
Does this database support a simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported?

### Methods inherited from class org.springframework.jdbc.core.metadata.GenericTableMetaDataProvider

`catalogNameToUse, columnNameToUse, getDatabaseVersion, getDefaultSchema, getIdentifierQuoteString, getTableParameterMetaData, initializeWithMetaData, initializeWithTableColumnMetaData, isGeneratedKeysColumnNameArraySupported, isGetGeneratedKeysSupported, isStoresLowerCaseIdentifiers, isStoresUpperCaseIdentifiers, isTableColumnMetaDataUsed, metaDataCatalogNameToUse, metaDataSchemaNameToUse, schemaNameToUse, setGeneratedKeysColumnNameArraySupported, setGetGeneratedKeysSupported, setStoresLowerCaseIdentifiers, setStoresUpperCaseIdentifiers, tableNameToUse`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PostgresTableMetaDataProvider

public PostgresTableMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException

Throws:
  `SQLException`

## Method Details

### isGetGeneratedKeysSimulated

public boolean isGetGeneratedKeysSimulated()
Description copied from interface: `TableMetaDataProvider`
Does this database support a simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported?

Specified by:
  `isGetGeneratedKeysSimulated` in interface `TableMetaDataProvider`
Overrides:
  `isGetGeneratedKeysSimulated` in class `GenericTableMetaDataProvider`
See Also:
  - `TableMetaDataProvider.isGetGeneratedKeysSupported()`
  - `TableMetaDataProvider.getSimpleQueryForGetGeneratedKey(String, String)`

### getSimpleQueryForGetGeneratedKey

public String getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName)
Description copied from interface: `TableMetaDataProvider`
Get the simple query to retrieve generated keys when the JDBC feature for retrieving generated keys is not supported.

Specified by:
  `getSimpleQueryForGetGeneratedKey` in interface `TableMetaDataProvider`
Overrides:
  `getSimpleQueryForGetGeneratedKey` in class `GenericTableMetaDataProvider`
See Also:
  - `TableMetaDataProvider.isGetGeneratedKeysSimulated()`