Class PgDatabaseMetaData
- java.lang.Object
-
- org.postgresql.jdbc.PgDatabaseMetaData
-
- All Implemented Interfaces:
java.sql.DatabaseMetaData
,java.sql.Wrapper
public class PgDatabaseMetaData extends java.lang.Object implements java.sql.DatabaseMetaData
-
-
Field Summary
Fields Modifier and Type Field Description protected PgConnection
connection
-
Fields inherited from interface java.sql.DatabaseMetaData
attributeNoNulls, attributeNullable, attributeNullableUnknown, bestRowNotPseudo, bestRowPseudo, bestRowSession, bestRowTemporary, bestRowTransaction, bestRowUnknown, columnNoNulls, columnNullable, columnNullableUnknown, functionColumnIn, functionColumnInOut, functionColumnOut, functionColumnResult, functionColumnUnknown, functionNoNulls, functionNoTable, functionNullable, functionNullableUnknown, functionResultUnknown, functionReturn, functionReturnsTable, importedKeyCascade, importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, importedKeyNoAction, importedKeyNotDeferrable, importedKeyRestrict, importedKeySetDefault, importedKeySetNull, procedureColumnIn, procedureColumnInOut, procedureColumnOut, procedureColumnResult, procedureColumnReturn, procedureColumnUnknown, procedureNoNulls, procedureNoResult, procedureNullable, procedureNullableUnknown, procedureResultUnknown, procedureReturnsResult, sqlStateSQL, sqlStateSQL99, sqlStateXOpen, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown
-
-
Constructor Summary
Constructors Constructor Description PgDatabaseMetaData(PgConnection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allProceduresAreCallable()
boolean
allTablesAreSelectable()
boolean
autoCommitFailureClosesAllResultSets()
protected java.sql.Statement
createMetaDataStatement()
boolean
dataDefinitionCausesTransactionCommit()
Does a data definition statement within a transaction force the transaction to commit? It seems to mean something like:boolean
dataDefinitionIgnoredInTransactions()
boolean
deletesAreDetected(int i)
boolean
doesMaxRowSizeIncludeBlobs()
protected java.lang.String
escapeQuotes(java.lang.String s)
Turn the provided value into a valid string literal for direct inclusion into a query.boolean
generatedKeyAlwaysReturned()
java.sql.ResultSet
getAttributes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, java.lang.String attributeNamePattern)
java.sql.ResultSet
getBestRowIdentifier(java.lang.String catalog, java.lang.String schema, java.lang.String table, int scope, boolean nullable)
java.sql.ResultSet
getCatalogs()
PostgreSQL does not support multiple catalogs from a single connection, so to reduce confusion we only return the current catalog.java.lang.String
getCatalogSeparator()
java.lang.String
getCatalogTerm()
java.sql.ResultSet
getClientInfoProperties()
java.sql.ResultSet
getColumnPrivileges(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String columnNamePattern)
java.sql.ResultSet
getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern)
java.sql.Connection
getConnection()
java.sql.ResultSet
getCrossReference(java.lang.String primaryCatalog, java.lang.String primarySchema, java.lang.String primaryTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable)
int
getDatabaseMajorVersion()
int
getDatabaseMinorVersion()
java.lang.String
getDatabaseProductName()
Retrieves the name of this database product.java.lang.String
getDatabaseProductVersion()
int
getDefaultTransactionIsolation()
int
getDriverMajorVersion()
int
getDriverMinorVersion()
java.lang.String
getDriverName()
java.lang.String
getDriverVersion()
java.sql.ResultSet
getExportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
java.lang.String
getExtraNameCharacters()
java.sql.ResultSet
getFunctionColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern, java.lang.String columnNamePattern)
java.sql.ResultSet
getFunctions(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern)
java.lang.String
getIdentifierQuoteString()
What is the string used to quote SQL identifiers? This returns a space if identifier quoting isn't supported.protected java.sql.ResultSet
getImportedExportedKeys(java.lang.String primaryCatalog, java.lang.String primarySchema, java.lang.String primaryTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable)
java.sql.ResultSet
getImportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
java.sql.ResultSet
getIndexInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, boolean unique, boolean approximate)
int
getJDBCMajorVersion()
int
getJDBCMinorVersion()
int
getMaxBinaryLiteralLength()
int
getMaxCatalogNameLength()
int
getMaxCharLiteralLength()
int
getMaxColumnNameLength()
int
getMaxColumnsInGroupBy()
int
getMaxColumnsInIndex()
int
getMaxColumnsInOrderBy()
int
getMaxColumnsInSelect()
int
getMaxColumnsInTable()
What is the maximum number of columns in a table? From the CREATE TABLE reference page...int
getMaxConnections()
How many active connection can we have at a time to this database? Well, since it depends on postmaster, which just does a listen() followed by an accept() and fork(), its basically very high.int
getMaxCursorNameLength()
protected int
getMaxIndexKeys()
int
getMaxIndexLength()
long
getMaxLogicalLobSize()
protected int
getMaxNameLength()
int
getMaxProcedureNameLength()
int
getMaxRowSize()
int
getMaxSchemaNameLength()
int
getMaxStatementLength()
int
getMaxStatements()
int
getMaxTableNameLength()
int
getMaxTablesInSelect()
int
getMaxUserNameLength()
java.lang.String
getNumericFunctions()
java.sql.ResultSet
getPrimaryKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
java.sql.ResultSet
getProcedureColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern, java.lang.String columnNamePattern)
java.sql.ResultSet
getProcedures(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern)
java.lang.String
getProcedureTerm()
java.sql.ResultSet
getPseudoColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern)
int
getResultSetHoldability()
java.sql.RowIdLifetime
getRowIdLifetime()
java.sql.ResultSet
getSchemas()
java.sql.ResultSet
getSchemas(java.lang.String catalog, java.lang.String schemaPattern)
java.lang.String
getSchemaTerm()
java.lang.String
getSearchStringEscape()
java.lang.String
getSQLKeywords()
int
getSQLStateType()
java.lang.String
getStringFunctions()
java.sql.ResultSet
getSuperTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
java.sql.ResultSet
getSuperTypes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern)
java.lang.String
getSystemFunctions()
java.sql.ResultSet
getTablePrivileges(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
java.sql.ResultSet
getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String[] types)
java.sql.ResultSet
getTableTypes()
java.lang.String
getTimeDateFunctions()
java.sql.ResultSet
getTypeInfo()
java.sql.ResultSet
getUDTs(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, int[] types)
java.lang.String
getURL()
java.lang.String
getUserName()
java.sql.ResultSet
getVersionColumns(java.lang.String catalog, java.lang.String schema, java.lang.String table)
boolean
insertsAreDetected(int type)
boolean
isCatalogAtStart()
boolean
isReadOnly()
boolean
isWrapperFor(java.lang.Class<?> iface)
boolean
locatorsUpdateCopy()
boolean
nullPlusNonNullIsNull()
boolean
nullsAreSortedAtEnd()
boolean
nullsAreSortedAtStart()
boolean
nullsAreSortedHigh()
boolean
nullsAreSortedLow()
boolean
othersDeletesAreVisible(int i)
boolean
othersInsertsAreVisible(int type)
boolean
othersUpdatesAreVisible(int type)
boolean
ownDeletesAreVisible(int type)
boolean
ownInsertsAreVisible(int type)
boolean
ownUpdatesAreVisible(int type)
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String[]>>>
parseACL(java.lang.String aclArray, java.lang.String owner)
Take the a String representing an array of ACLs and return a Map mapping the SQL permission name to a List of usernames who have that permission.boolean
storesLowerCaseIdentifiers()
boolean
storesLowerCaseQuotedIdentifiers()
boolean
storesMixedCaseIdentifiers()
boolean
storesMixedCaseQuotedIdentifiers()
boolean
storesUpperCaseIdentifiers()
boolean
storesUpperCaseQuotedIdentifiers()
boolean
supportsAlterTableWithAddColumn()
boolean
supportsAlterTableWithDropColumn()
boolean
supportsANSI92EntryLevelSQL()
Does this driver support the ANSI-92 entry level SQL grammar? All JDBC Compliant drivers must return true.boolean
supportsANSI92FullSQL()
boolean
supportsANSI92IntermediateSQL()
boolean
supportsBatchUpdates()
boolean
supportsCatalogsInDataManipulation()
boolean
supportsCatalogsInIndexDefinitions()
boolean
supportsCatalogsInPrivilegeDefinitions()
boolean
supportsCatalogsInProcedureCalls()
boolean
supportsCatalogsInTableDefinitions()
boolean
supportsColumnAliasing()
boolean
supportsConvert()
boolean
supportsConvert(int fromType, int toType)
boolean
supportsCoreSQLGrammar()
Does this driver support the Core ODBC SQL grammar.boolean
supportsCorrelatedSubqueries()
boolean
supportsDataDefinitionAndDataManipulationTransactions()
boolean
supportsDataManipulationTransactionsOnly()
boolean
supportsDifferentTableCorrelationNames()
boolean
supportsExpressionsInOrderBy()
boolean
supportsExtendedSQLGrammar()
Does this driver support the Extended (Level 2) ODBC SQL grammar.boolean
supportsFullOuterJoins()
boolean
supportsGetGeneratedKeys()
boolean
supportsGroupBy()
boolean
supportsGroupByBeyondSelect()
boolean
supportsGroupByUnrelated()
boolean
supportsIntegrityEnhancementFacility()
boolean
supportsLikeEscapeClause()
boolean
supportsLimitedOuterJoins()
boolean
supportsMinimumSQLGrammar()
boolean
supportsMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-Compliant driver will always return false.boolean
supportsMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC compliant driver will always return true.boolean
supportsMultipleOpenResults()
boolean
supportsMultipleResultSets()
boolean
supportsMultipleTransactions()
boolean
supportsNamedParameters()
boolean
supportsNonNullableColumns()
boolean
supportsOpenCursorsAcrossCommit()
In PostgreSQL, Cursors are only open within transactions.boolean
supportsOpenCursorsAcrossRollback()
boolean
supportsOpenStatementsAcrossCommit()
boolean
supportsOpenStatementsAcrossRollback()
boolean
supportsOrderByUnrelated()
boolean
supportsOuterJoins()
boolean
supportsPositionedDelete()
We support cursors for gets only it seems.boolean
supportsPositionedUpdate()
boolean
supportsRefCursors()
boolean
supportsResultSetConcurrency(int type, int concurrency)
boolean
supportsResultSetHoldability(int holdability)
boolean
supportsResultSetType(int type)
boolean
supportsSavepoints()
boolean
supportsSchemasInDataManipulation()
boolean
supportsSchemasInIndexDefinitions()
boolean
supportsSchemasInPrivilegeDefinitions()
boolean
supportsSchemasInProcedureCalls()
boolean
supportsSchemasInTableDefinitions()
boolean
supportsSelectForUpdate()
boolean
supportsStatementPooling()
boolean
supportsStoredFunctionsUsingCallSyntax()
boolean
supportsStoredProcedures()
boolean
supportsSubqueriesInComparisons()
boolean
supportsSubqueriesInExists()
boolean
supportsSubqueriesInIns()
boolean
supportsSubqueriesInQuantifieds()
boolean
supportsTableCorrelationNames()
boolean
supportsTransactionIsolationLevel(int level)
boolean
supportsTransactions()
boolean
supportsUnion()
boolean
supportsUnionAll()
<T> T
unwrap(java.lang.Class<T> iface)
boolean
updatesAreDetected(int type)
boolean
usesLocalFilePerTable()
Does the database use a file for each table? Well, not really, since it doesn't use local files.boolean
usesLocalFiles()
Does the database store tables in a local file? No - it stores them in a file on the server.
-
-
-
Field Detail
-
connection
protected final PgConnection connection
-
-
Constructor Detail
-
PgDatabaseMetaData
public PgDatabaseMetaData(PgConnection conn)
-
-
Method Detail
-
getMaxIndexKeys
protected int getMaxIndexKeys() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getMaxNameLength
protected int getMaxNameLength() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
allProceduresAreCallable
public boolean allProceduresAreCallable() throws java.sql.SQLException
- Specified by:
allProceduresAreCallable
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
allTablesAreSelectable
public boolean allTablesAreSelectable() throws java.sql.SQLException
- Specified by:
allTablesAreSelectable
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getURL
public java.lang.String getURL() throws java.sql.SQLException
- Specified by:
getURL
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getUserName
public java.lang.String getUserName() throws java.sql.SQLException
- Specified by:
getUserName
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
isReadOnly
public boolean isReadOnly() throws java.sql.SQLException
- Specified by:
isReadOnly
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
nullsAreSortedHigh
public boolean nullsAreSortedHigh() throws java.sql.SQLException
- Specified by:
nullsAreSortedHigh
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
nullsAreSortedLow
public boolean nullsAreSortedLow() throws java.sql.SQLException
- Specified by:
nullsAreSortedLow
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
nullsAreSortedAtStart
public boolean nullsAreSortedAtStart() throws java.sql.SQLException
- Specified by:
nullsAreSortedAtStart
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
nullsAreSortedAtEnd
public boolean nullsAreSortedAtEnd() throws java.sql.SQLException
- Specified by:
nullsAreSortedAtEnd
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getDatabaseProductName
public java.lang.String getDatabaseProductName() throws java.sql.SQLException
Retrieves the name of this database product. We hope that it is PostgreSQL, so we return that explicitly.- Specified by:
getDatabaseProductName
in interfacejava.sql.DatabaseMetaData
- Returns:
- "PostgreSQL"
- Throws:
java.sql.SQLException
-
getDatabaseProductVersion
public java.lang.String getDatabaseProductVersion() throws java.sql.SQLException
- Specified by:
getDatabaseProductVersion
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getDriverName
public java.lang.String getDriverName()
- Specified by:
getDriverName
in interfacejava.sql.DatabaseMetaData
-
getDriverVersion
public java.lang.String getDriverVersion()
- Specified by:
getDriverVersion
in interfacejava.sql.DatabaseMetaData
-
getDriverMajorVersion
public int getDriverMajorVersion()
- Specified by:
getDriverMajorVersion
in interfacejava.sql.DatabaseMetaData
-
getDriverMinorVersion
public int getDriverMinorVersion()
- Specified by:
getDriverMinorVersion
in interfacejava.sql.DatabaseMetaData
-
usesLocalFiles
public boolean usesLocalFiles() throws java.sql.SQLException
Does the database store tables in a local file? No - it stores them in a file on the server.- Specified by:
usesLocalFiles
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if so
- Throws:
java.sql.SQLException
- if a database access error occurs
-
usesLocalFilePerTable
public boolean usesLocalFilePerTable() throws java.sql.SQLException
Does the database use a file for each table? Well, not really, since it doesn't use local files.- Specified by:
usesLocalFilePerTable
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if so
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsMixedCaseIdentifiers
public boolean supportsMixedCaseIdentifiers() throws java.sql.SQLException
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-Compliant driver will always return false.- Specified by:
supportsMixedCaseIdentifiers
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if so
- Throws:
java.sql.SQLException
- if a database access error occurs
-
storesUpperCaseIdentifiers
public boolean storesUpperCaseIdentifiers() throws java.sql.SQLException
- Specified by:
storesUpperCaseIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
storesLowerCaseIdentifiers
public boolean storesLowerCaseIdentifiers() throws java.sql.SQLException
- Specified by:
storesLowerCaseIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
storesMixedCaseIdentifiers
public boolean storesMixedCaseIdentifiers() throws java.sql.SQLException
- Specified by:
storesMixedCaseIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsMixedCaseQuotedIdentifiers
public boolean supportsMixedCaseQuotedIdentifiers() throws java.sql.SQLException
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC compliant driver will always return true.- Specified by:
supportsMixedCaseQuotedIdentifiers
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if so
- Throws:
java.sql.SQLException
- if a database access error occurs
-
storesUpperCaseQuotedIdentifiers
public boolean storesUpperCaseQuotedIdentifiers() throws java.sql.SQLException
- Specified by:
storesUpperCaseQuotedIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
storesLowerCaseQuotedIdentifiers
public boolean storesLowerCaseQuotedIdentifiers() throws java.sql.SQLException
- Specified by:
storesLowerCaseQuotedIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
storesMixedCaseQuotedIdentifiers
public boolean storesMixedCaseQuotedIdentifiers() throws java.sql.SQLException
- Specified by:
storesMixedCaseQuotedIdentifiers
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getIdentifierQuoteString
public java.lang.String getIdentifierQuoteString() throws java.sql.SQLException
What is the string used to quote SQL identifiers? This returns a space if identifier quoting isn't supported. A JDBC Compliant driver will always use a double quote character.- Specified by:
getIdentifierQuoteString
in interfacejava.sql.DatabaseMetaData
- Returns:
- the quoting string
- Throws:
java.sql.SQLException
- if a database access error occurs
-
getSQLKeywords
public java.lang.String getSQLKeywords() throws java.sql.SQLException
From PostgreSQL 9.0+ return the keywords from pg_catalog.pg_get_keywords()
- Specified by:
getSQLKeywords
in interfacejava.sql.DatabaseMetaData
- Returns:
- a comma separated list of keywords we use
- Throws:
java.sql.SQLException
- if a database access error occurs
-
getNumericFunctions
public java.lang.String getNumericFunctions() throws java.sql.SQLException
- Specified by:
getNumericFunctions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getStringFunctions
public java.lang.String getStringFunctions() throws java.sql.SQLException
- Specified by:
getStringFunctions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSystemFunctions
public java.lang.String getSystemFunctions() throws java.sql.SQLException
- Specified by:
getSystemFunctions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getTimeDateFunctions
public java.lang.String getTimeDateFunctions() throws java.sql.SQLException
- Specified by:
getTimeDateFunctions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSearchStringEscape
public java.lang.String getSearchStringEscape() throws java.sql.SQLException
- Specified by:
getSearchStringEscape
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getExtraNameCharacters
public java.lang.String getExtraNameCharacters() throws java.sql.SQLException
Postgresql allows any high-bit character to be used in an unquoted identifier, so we can't possibly list them all.
From the file src/backend/parser/scan.l, an identifier is ident_start [A-Za-z\200-\377_] ident_cont [A-Za-z\200-\377_0-9\$] identifier {ident_start}{ident_cont}*
- Specified by:
getExtraNameCharacters
in interfacejava.sql.DatabaseMetaData
- Returns:
- a string containing the extra characters
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsAlterTableWithAddColumn
public boolean supportsAlterTableWithAddColumn() throws java.sql.SQLException
- Specified by:
supportsAlterTableWithAddColumn
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.1+
- Throws:
java.sql.SQLException
-
supportsAlterTableWithDropColumn
public boolean supportsAlterTableWithDropColumn() throws java.sql.SQLException
- Specified by:
supportsAlterTableWithDropColumn
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsColumnAliasing
public boolean supportsColumnAliasing() throws java.sql.SQLException
- Specified by:
supportsColumnAliasing
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
nullPlusNonNullIsNull
public boolean nullPlusNonNullIsNull() throws java.sql.SQLException
- Specified by:
nullPlusNonNullIsNull
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsConvert
public boolean supportsConvert() throws java.sql.SQLException
- Specified by:
supportsConvert
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsConvert
public boolean supportsConvert(int fromType, int toType) throws java.sql.SQLException
- Specified by:
supportsConvert
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsTableCorrelationNames
public boolean supportsTableCorrelationNames() throws java.sql.SQLException
- Specified by:
supportsTableCorrelationNames
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsDifferentTableCorrelationNames
public boolean supportsDifferentTableCorrelationNames() throws java.sql.SQLException
- Specified by:
supportsDifferentTableCorrelationNames
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsExpressionsInOrderBy
public boolean supportsExpressionsInOrderBy() throws java.sql.SQLException
- Specified by:
supportsExpressionsInOrderBy
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsOrderByUnrelated
public boolean supportsOrderByUnrelated() throws java.sql.SQLException
- Specified by:
supportsOrderByUnrelated
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.4+
- Throws:
java.sql.SQLException
-
supportsGroupBy
public boolean supportsGroupBy() throws java.sql.SQLException
- Specified by:
supportsGroupBy
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsGroupByUnrelated
public boolean supportsGroupByUnrelated() throws java.sql.SQLException
- Specified by:
supportsGroupByUnrelated
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.4+
- Throws:
java.sql.SQLException
-
supportsGroupByBeyondSelect
public boolean supportsGroupByBeyondSelect() throws java.sql.SQLException
- Specified by:
supportsGroupByBeyondSelect
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsLikeEscapeClause
public boolean supportsLikeEscapeClause() throws java.sql.SQLException
- Specified by:
supportsLikeEscapeClause
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsMultipleResultSets
public boolean supportsMultipleResultSets() throws java.sql.SQLException
- Specified by:
supportsMultipleResultSets
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsMultipleTransactions
public boolean supportsMultipleTransactions() throws java.sql.SQLException
- Specified by:
supportsMultipleTransactions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsNonNullableColumns
public boolean supportsNonNullableColumns() throws java.sql.SQLException
- Specified by:
supportsNonNullableColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsMinimumSQLGrammar
public boolean supportsMinimumSQLGrammar() throws java.sql.SQLException
This grammar is defined at: http://www.microsoft.com/msdn/sdk/platforms/doc/odbc/src/intropr.htm
In Appendix C. From this description, we seem to support the ODBC minimal (Level 0) grammar.
- Specified by:
supportsMinimumSQLGrammar
in interfacejava.sql.DatabaseMetaData
- Returns:
- true
- Throws:
java.sql.SQLException
-
supportsCoreSQLGrammar
public boolean supportsCoreSQLGrammar() throws java.sql.SQLException
Does this driver support the Core ODBC SQL grammar. We need SQL-92 conformance for this.- Specified by:
supportsCoreSQLGrammar
in interfacejava.sql.DatabaseMetaData
- Returns:
- false
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsExtendedSQLGrammar
public boolean supportsExtendedSQLGrammar() throws java.sql.SQLException
Does this driver support the Extended (Level 2) ODBC SQL grammar. We don't conform to the Core (Level 1), so we can't conform to the Extended SQL Grammar.- Specified by:
supportsExtendedSQLGrammar
in interfacejava.sql.DatabaseMetaData
- Returns:
- false
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsANSI92EntryLevelSQL
public boolean supportsANSI92EntryLevelSQL() throws java.sql.SQLException
Does this driver support the ANSI-92 entry level SQL grammar? All JDBC Compliant drivers must return true. We currently report false until 'schema' support is added. Then this should be changed to return true, since we will be mostly compliant (probably more compliant than many other databases) And since this is a requirement for all JDBC drivers we need to get to the point where we can return true.- Specified by:
supportsANSI92EntryLevelSQL
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsANSI92IntermediateSQL
public boolean supportsANSI92IntermediateSQL() throws java.sql.SQLException
- Specified by:
supportsANSI92IntermediateSQL
in interfacejava.sql.DatabaseMetaData
- Returns:
- false
- Throws:
java.sql.SQLException
-
supportsANSI92FullSQL
public boolean supportsANSI92FullSQL() throws java.sql.SQLException
- Specified by:
supportsANSI92FullSQL
in interfacejava.sql.DatabaseMetaData
- Returns:
- false
- Throws:
java.sql.SQLException
-
supportsIntegrityEnhancementFacility
public boolean supportsIntegrityEnhancementFacility() throws java.sql.SQLException
- Specified by:
supportsIntegrityEnhancementFacility
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsOuterJoins
public boolean supportsOuterJoins() throws java.sql.SQLException
- Specified by:
supportsOuterJoins
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
java.sql.SQLException
-
supportsFullOuterJoins
public boolean supportsFullOuterJoins() throws java.sql.SQLException
- Specified by:
supportsFullOuterJoins
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
java.sql.SQLException
-
supportsLimitedOuterJoins
public boolean supportsLimitedOuterJoins() throws java.sql.SQLException
- Specified by:
supportsLimitedOuterJoins
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
java.sql.SQLException
-
getSchemaTerm
public java.lang.String getSchemaTerm() throws java.sql.SQLException
PostgreSQL doesn't have schemas, but when it does, we'll use the term "schema".
- Specified by:
getSchemaTerm
in interfacejava.sql.DatabaseMetaData
- Returns:
"schema"
- Throws:
java.sql.SQLException
-
getProcedureTerm
public java.lang.String getProcedureTerm() throws java.sql.SQLException
- Specified by:
getProcedureTerm
in interfacejava.sql.DatabaseMetaData
- Returns:
"function"
- Throws:
java.sql.SQLException
-
getCatalogTerm
public java.lang.String getCatalogTerm() throws java.sql.SQLException
- Specified by:
getCatalogTerm
in interfacejava.sql.DatabaseMetaData
- Returns:
"database"
- Throws:
java.sql.SQLException
-
isCatalogAtStart
public boolean isCatalogAtStart() throws java.sql.SQLException
- Specified by:
isCatalogAtStart
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getCatalogSeparator
public java.lang.String getCatalogSeparator() throws java.sql.SQLException
- Specified by:
getCatalogSeparator
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSchemasInDataManipulation
public boolean supportsSchemasInDataManipulation() throws java.sql.SQLException
- Specified by:
supportsSchemasInDataManipulation
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsSchemasInProcedureCalls
public boolean supportsSchemasInProcedureCalls() throws java.sql.SQLException
- Specified by:
supportsSchemasInProcedureCalls
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsSchemasInTableDefinitions
public boolean supportsSchemasInTableDefinitions() throws java.sql.SQLException
- Specified by:
supportsSchemasInTableDefinitions
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsSchemasInIndexDefinitions
public boolean supportsSchemasInIndexDefinitions() throws java.sql.SQLException
- Specified by:
supportsSchemasInIndexDefinitions
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsSchemasInPrivilegeDefinitions
public boolean supportsSchemasInPrivilegeDefinitions() throws java.sql.SQLException
- Specified by:
supportsSchemasInPrivilegeDefinitions
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
java.sql.SQLException
-
supportsCatalogsInDataManipulation
public boolean supportsCatalogsInDataManipulation() throws java.sql.SQLException
- Specified by:
supportsCatalogsInDataManipulation
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsCatalogsInProcedureCalls
public boolean supportsCatalogsInProcedureCalls() throws java.sql.SQLException
- Specified by:
supportsCatalogsInProcedureCalls
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsCatalogsInTableDefinitions
public boolean supportsCatalogsInTableDefinitions() throws java.sql.SQLException
- Specified by:
supportsCatalogsInTableDefinitions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsCatalogsInIndexDefinitions
public boolean supportsCatalogsInIndexDefinitions() throws java.sql.SQLException
- Specified by:
supportsCatalogsInIndexDefinitions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsCatalogsInPrivilegeDefinitions
public boolean supportsCatalogsInPrivilegeDefinitions() throws java.sql.SQLException
- Specified by:
supportsCatalogsInPrivilegeDefinitions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsPositionedDelete
public boolean supportsPositionedDelete() throws java.sql.SQLException
We support cursors for gets only it seems. I dont see a method to get a positioned delete.- Specified by:
supportsPositionedDelete
in interfacejava.sql.DatabaseMetaData
- Returns:
- false
- Throws:
java.sql.SQLException
- if a database access error occurs
-
supportsPositionedUpdate
public boolean supportsPositionedUpdate() throws java.sql.SQLException
- Specified by:
supportsPositionedUpdate
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSelectForUpdate
public boolean supportsSelectForUpdate() throws java.sql.SQLException
- Specified by:
supportsSelectForUpdate
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.5+
- Throws:
java.sql.SQLException
-
supportsStoredProcedures
public boolean supportsStoredProcedures() throws java.sql.SQLException
- Specified by:
supportsStoredProcedures
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSubqueriesInComparisons
public boolean supportsSubqueriesInComparisons() throws java.sql.SQLException
- Specified by:
supportsSubqueriesInComparisons
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSubqueriesInExists
public boolean supportsSubqueriesInExists() throws java.sql.SQLException
- Specified by:
supportsSubqueriesInExists
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSubqueriesInIns
public boolean supportsSubqueriesInIns() throws java.sql.SQLException
- Specified by:
supportsSubqueriesInIns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSubqueriesInQuantifieds
public boolean supportsSubqueriesInQuantifieds() throws java.sql.SQLException
- Specified by:
supportsSubqueriesInQuantifieds
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsCorrelatedSubqueries
public boolean supportsCorrelatedSubqueries() throws java.sql.SQLException
- Specified by:
supportsCorrelatedSubqueries
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
java.sql.SQLException
-
supportsUnion
public boolean supportsUnion() throws java.sql.SQLException
- Specified by:
supportsUnion
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.3+
- Throws:
java.sql.SQLException
-
supportsUnionAll
public boolean supportsUnionAll() throws java.sql.SQLException
- Specified by:
supportsUnionAll
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
java.sql.SQLException
-
supportsOpenCursorsAcrossCommit
public boolean supportsOpenCursorsAcrossCommit() throws java.sql.SQLException
In PostgreSQL, Cursors are only open within transactions.- Specified by:
supportsOpenCursorsAcrossCommit
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsOpenCursorsAcrossRollback
public boolean supportsOpenCursorsAcrossRollback() throws java.sql.SQLException
- Specified by:
supportsOpenCursorsAcrossRollback
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsOpenStatementsAcrossCommit
public boolean supportsOpenStatementsAcrossCommit() throws java.sql.SQLException
Can statements remain open across commits? They may, but this driver cannot guarantee that. In further reflection. we are talking a Statement object here, so the answer is yes, since the Statement is only a vehicle to ExecSQL()
- Specified by:
supportsOpenStatementsAcrossCommit
in interfacejava.sql.DatabaseMetaData
- Returns:
- true
- Throws:
java.sql.SQLException
-
supportsOpenStatementsAcrossRollback
public boolean supportsOpenStatementsAcrossRollback() throws java.sql.SQLException
Can statements remain open across rollbacks? They may, but this driver cannot guarantee that. In further contemplation, we are talking a Statement object here, so the answer is yes, since the Statement is only a vehicle to ExecSQL() in Connection
- Specified by:
supportsOpenStatementsAcrossRollback
in interfacejava.sql.DatabaseMetaData
- Returns:
- true
- Throws:
java.sql.SQLException
-
getMaxCharLiteralLength
public int getMaxCharLiteralLength() throws java.sql.SQLException
- Specified by:
getMaxCharLiteralLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxBinaryLiteralLength
public int getMaxBinaryLiteralLength() throws java.sql.SQLException
- Specified by:
getMaxBinaryLiteralLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnNameLength
public int getMaxColumnNameLength() throws java.sql.SQLException
- Specified by:
getMaxColumnNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnsInGroupBy
public int getMaxColumnsInGroupBy() throws java.sql.SQLException
- Specified by:
getMaxColumnsInGroupBy
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnsInIndex
public int getMaxColumnsInIndex() throws java.sql.SQLException
- Specified by:
getMaxColumnsInIndex
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnsInOrderBy
public int getMaxColumnsInOrderBy() throws java.sql.SQLException
- Specified by:
getMaxColumnsInOrderBy
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnsInSelect
public int getMaxColumnsInSelect() throws java.sql.SQLException
- Specified by:
getMaxColumnsInSelect
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxColumnsInTable
public int getMaxColumnsInTable() throws java.sql.SQLException
What is the maximum number of columns in a table? From the CREATE TABLE reference page..."The new class is created as a heap with no initial data. A class can have no more than 1600 attributes (realistically, this is limited by the fact that tuple sizes must be less than 8192 bytes)..."
- Specified by:
getMaxColumnsInTable
in interfacejava.sql.DatabaseMetaData
- Returns:
- the max columns
- Throws:
java.sql.SQLException
- if a database access error occurs
-
getMaxConnections
public int getMaxConnections() throws java.sql.SQLException
How many active connection can we have at a time to this database? Well, since it depends on postmaster, which just does a listen() followed by an accept() and fork(), its basically very high. Unless the system runs out of processes, it can be 65535 (the number of aux. ports on a TCP/IP system). I will return 8192 since that is what even the largest system can realistically handle,- Specified by:
getMaxConnections
in interfacejava.sql.DatabaseMetaData
- Returns:
- the maximum number of connections
- Throws:
java.sql.SQLException
- if a database access error occurs
-
getMaxCursorNameLength
public int getMaxCursorNameLength() throws java.sql.SQLException
- Specified by:
getMaxCursorNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxIndexLength
public int getMaxIndexLength() throws java.sql.SQLException
- Specified by:
getMaxIndexLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxSchemaNameLength
public int getMaxSchemaNameLength() throws java.sql.SQLException
- Specified by:
getMaxSchemaNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxProcedureNameLength
public int getMaxProcedureNameLength() throws java.sql.SQLException
- Specified by:
getMaxProcedureNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxCatalogNameLength
public int getMaxCatalogNameLength() throws java.sql.SQLException
- Specified by:
getMaxCatalogNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxRowSize
public int getMaxRowSize() throws java.sql.SQLException
- Specified by:
getMaxRowSize
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
doesMaxRowSizeIncludeBlobs
public boolean doesMaxRowSizeIncludeBlobs() throws java.sql.SQLException
- Specified by:
doesMaxRowSizeIncludeBlobs
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxStatementLength
public int getMaxStatementLength() throws java.sql.SQLException
- Specified by:
getMaxStatementLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxStatements
public int getMaxStatements() throws java.sql.SQLException
- Specified by:
getMaxStatements
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxTableNameLength
public int getMaxTableNameLength() throws java.sql.SQLException
- Specified by:
getMaxTableNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxTablesInSelect
public int getMaxTablesInSelect() throws java.sql.SQLException
- Specified by:
getMaxTablesInSelect
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getMaxUserNameLength
public int getMaxUserNameLength() throws java.sql.SQLException
- Specified by:
getMaxUserNameLength
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getDefaultTransactionIsolation
public int getDefaultTransactionIsolation() throws java.sql.SQLException
- Specified by:
getDefaultTransactionIsolation
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsTransactions
public boolean supportsTransactions() throws java.sql.SQLException
- Specified by:
supportsTransactions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsTransactionIsolationLevel
public boolean supportsTransactionIsolationLevel(int level) throws java.sql.SQLException
We only support TRANSACTION_SERIALIZABLE and TRANSACTION_READ_COMMITTED before 8.0; from 8.0 READ_UNCOMMITTED and REPEATABLE_READ are accepted aliases for READ_COMMITTED.
- Specified by:
supportsTransactionIsolationLevel
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsDataDefinitionAndDataManipulationTransactions
public boolean supportsDataDefinitionAndDataManipulationTransactions() throws java.sql.SQLException
- Specified by:
supportsDataDefinitionAndDataManipulationTransactions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsDataManipulationTransactionsOnly
public boolean supportsDataManipulationTransactionsOnly() throws java.sql.SQLException
- Specified by:
supportsDataManipulationTransactionsOnly
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
dataDefinitionCausesTransactionCommit
public boolean dataDefinitionCausesTransactionCommit() throws java.sql.SQLException
Does a data definition statement within a transaction force the transaction to commit? It seems to mean something like:
CREATE TABLE T (A INT); INSERT INTO T (A) VALUES (2); BEGIN; UPDATE T SET A = A + 1; CREATE TABLE X (A INT); SELECT A FROM T INTO X; COMMIT;
Does the CREATE TABLE call cause a commit? The answer is no.
- Specified by:
dataDefinitionCausesTransactionCommit
in interfacejava.sql.DatabaseMetaData
- Returns:
- true if so
- Throws:
java.sql.SQLException
- if a database access error occurs
-
dataDefinitionIgnoredInTransactions
public boolean dataDefinitionIgnoredInTransactions() throws java.sql.SQLException
- Specified by:
dataDefinitionIgnoredInTransactions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
escapeQuotes
protected java.lang.String escapeQuotes(java.lang.String s) throws java.sql.SQLException
Turn the provided value into a valid string literal for direct inclusion into a query. This includes the single quotes needed around it.- Parameters:
s
- input value- Returns:
- string literal for direct inclusion into a query
- Throws:
java.sql.SQLException
- if something wrong happens
-
getProcedures
public java.sql.ResultSet getProcedures(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern) throws java.sql.SQLException
- Specified by:
getProcedures
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getProcedureColumns
public java.sql.ResultSet getProcedureColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern, java.lang.String columnNamePattern) throws java.sql.SQLException
- Specified by:
getProcedureColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getTables
public java.sql.ResultSet getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String[] types) throws java.sql.SQLException
- Specified by:
getTables
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSchemas
public java.sql.ResultSet getSchemas() throws java.sql.SQLException
- Specified by:
getSchemas
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSchemas
public java.sql.ResultSet getSchemas(java.lang.String catalog, java.lang.String schemaPattern) throws java.sql.SQLException
- Specified by:
getSchemas
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getCatalogs
public java.sql.ResultSet getCatalogs() throws java.sql.SQLException
PostgreSQL does not support multiple catalogs from a single connection, so to reduce confusion we only return the current catalog.- Specified by:
getCatalogs
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getTableTypes
public java.sql.ResultSet getTableTypes() throws java.sql.SQLException
- Specified by:
getTableTypes
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getColumns
public java.sql.ResultSet getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern) throws java.sql.SQLException
- Specified by:
getColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getColumnPrivileges
public java.sql.ResultSet getColumnPrivileges(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String columnNamePattern) throws java.sql.SQLException
- Specified by:
getColumnPrivileges
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getTablePrivileges
public java.sql.ResultSet getTablePrivileges(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern) throws java.sql.SQLException
- Specified by:
getTablePrivileges
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
parseACL
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<java.lang.String[]>>> parseACL(java.lang.String aclArray, java.lang.String owner)
Take the a String representing an array of ACLs and return a Map mapping the SQL permission name to a List of usernames who have that permission. For instance:SELECT -> user1 -> list of [grantor, grantable]
- Parameters:
aclArray
- ACL arrayowner
- owner- Returns:
- a Map mapping the SQL permission name
-
getBestRowIdentifier
public java.sql.ResultSet getBestRowIdentifier(java.lang.String catalog, java.lang.String schema, java.lang.String table, int scope, boolean nullable) throws java.sql.SQLException
- Specified by:
getBestRowIdentifier
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getVersionColumns
public java.sql.ResultSet getVersionColumns(java.lang.String catalog, java.lang.String schema, java.lang.String table) throws java.sql.SQLException
- Specified by:
getVersionColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getPrimaryKeys
public java.sql.ResultSet getPrimaryKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table) throws java.sql.SQLException
- Specified by:
getPrimaryKeys
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getImportedExportedKeys
protected java.sql.ResultSet getImportedExportedKeys(java.lang.String primaryCatalog, java.lang.String primarySchema, java.lang.String primaryTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable) throws java.sql.SQLException
- Parameters:
primaryCatalog
- primary catalogprimarySchema
- primary schemaprimaryTable
- if provided will get the keys exported by this tableforeignCatalog
- foreign catalogforeignSchema
- foreign schemaforeignTable
- if provided will get the keys imported by this table- Returns:
- ResultSet
- Throws:
java.sql.SQLException
- if something wrong happens
-
getImportedKeys
public java.sql.ResultSet getImportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table) throws java.sql.SQLException
- Specified by:
getImportedKeys
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getExportedKeys
public java.sql.ResultSet getExportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table) throws java.sql.SQLException
- Specified by:
getExportedKeys
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getCrossReference
public java.sql.ResultSet getCrossReference(java.lang.String primaryCatalog, java.lang.String primarySchema, java.lang.String primaryTable, java.lang.String foreignCatalog, java.lang.String foreignSchema, java.lang.String foreignTable) throws java.sql.SQLException
- Specified by:
getCrossReference
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getTypeInfo
public java.sql.ResultSet getTypeInfo() throws java.sql.SQLException
- Specified by:
getTypeInfo
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getIndexInfo
public java.sql.ResultSet getIndexInfo(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, boolean unique, boolean approximate) throws java.sql.SQLException
- Specified by:
getIndexInfo
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsResultSetType
public boolean supportsResultSetType(int type) throws java.sql.SQLException
- Specified by:
supportsResultSetType
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsResultSetConcurrency
public boolean supportsResultSetConcurrency(int type, int concurrency) throws java.sql.SQLException
- Specified by:
supportsResultSetConcurrency
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
ownUpdatesAreVisible
public boolean ownUpdatesAreVisible(int type) throws java.sql.SQLException
- Specified by:
ownUpdatesAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
ownDeletesAreVisible
public boolean ownDeletesAreVisible(int type) throws java.sql.SQLException
- Specified by:
ownDeletesAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
ownInsertsAreVisible
public boolean ownInsertsAreVisible(int type) throws java.sql.SQLException
- Specified by:
ownInsertsAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
othersUpdatesAreVisible
public boolean othersUpdatesAreVisible(int type) throws java.sql.SQLException
- Specified by:
othersUpdatesAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
othersDeletesAreVisible
public boolean othersDeletesAreVisible(int i) throws java.sql.SQLException
- Specified by:
othersDeletesAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
othersInsertsAreVisible
public boolean othersInsertsAreVisible(int type) throws java.sql.SQLException
- Specified by:
othersInsertsAreVisible
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
updatesAreDetected
public boolean updatesAreDetected(int type) throws java.sql.SQLException
- Specified by:
updatesAreDetected
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
deletesAreDetected
public boolean deletesAreDetected(int i) throws java.sql.SQLException
- Specified by:
deletesAreDetected
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
insertsAreDetected
public boolean insertsAreDetected(int type) throws java.sql.SQLException
- Specified by:
insertsAreDetected
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsBatchUpdates
public boolean supportsBatchUpdates() throws java.sql.SQLException
- Specified by:
supportsBatchUpdates
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getUDTs
public java.sql.ResultSet getUDTs(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, int[] types) throws java.sql.SQLException
- Specified by:
getUDTs
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
createMetaDataStatement
protected java.sql.Statement createMetaDataStatement() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getMaxLogicalLobSize
public long getMaxLogicalLobSize() throws java.sql.SQLException
- Specified by:
getMaxLogicalLobSize
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsRefCursors
public boolean supportsRefCursors() throws java.sql.SQLException
- Specified by:
supportsRefCursors
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getRowIdLifetime
public java.sql.RowIdLifetime getRowIdLifetime() throws java.sql.SQLException
- Specified by:
getRowIdLifetime
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsStoredFunctionsUsingCallSyntax
public boolean supportsStoredFunctionsUsingCallSyntax() throws java.sql.SQLException
- Specified by:
supportsStoredFunctionsUsingCallSyntax
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
autoCommitFailureClosesAllResultSets
public boolean autoCommitFailureClosesAllResultSets() throws java.sql.SQLException
- Specified by:
autoCommitFailureClosesAllResultSets
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getClientInfoProperties
public java.sql.ResultSet getClientInfoProperties() throws java.sql.SQLException
- Specified by:
getClientInfoProperties
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
getFunctions
public java.sql.ResultSet getFunctions(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern) throws java.sql.SQLException
- Specified by:
getFunctions
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getFunctionColumns
public java.sql.ResultSet getFunctionColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern, java.lang.String columnNamePattern) throws java.sql.SQLException
- Specified by:
getFunctionColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getPseudoColumns
public java.sql.ResultSet getPseudoColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern) throws java.sql.SQLException
- Specified by:
getPseudoColumns
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
generatedKeyAlwaysReturned
public boolean generatedKeyAlwaysReturned() throws java.sql.SQLException
- Specified by:
generatedKeyAlwaysReturned
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsSavepoints
public boolean supportsSavepoints() throws java.sql.SQLException
- Specified by:
supportsSavepoints
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsNamedParameters
public boolean supportsNamedParameters() throws java.sql.SQLException
- Specified by:
supportsNamedParameters
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsMultipleOpenResults
public boolean supportsMultipleOpenResults() throws java.sql.SQLException
- Specified by:
supportsMultipleOpenResults
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsGetGeneratedKeys
public boolean supportsGetGeneratedKeys() throws java.sql.SQLException
- Specified by:
supportsGetGeneratedKeys
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSuperTypes
public java.sql.ResultSet getSuperTypes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern) throws java.sql.SQLException
- Specified by:
getSuperTypes
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getSuperTables
public java.sql.ResultSet getSuperTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern) throws java.sql.SQLException
- Specified by:
getSuperTables
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getAttributes
public java.sql.ResultSet getAttributes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, java.lang.String attributeNamePattern) throws java.sql.SQLException
- Specified by:
getAttributes
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsResultSetHoldability
public boolean supportsResultSetHoldability(int holdability) throws java.sql.SQLException
- Specified by:
supportsResultSetHoldability
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getResultSetHoldability
public int getResultSetHoldability() throws java.sql.SQLException
- Specified by:
getResultSetHoldability
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion() throws java.sql.SQLException
- Specified by:
getDatabaseMajorVersion
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion() throws java.sql.SQLException
- Specified by:
getDatabaseMinorVersion
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
getJDBCMajorVersion
public int getJDBCMajorVersion()
- Specified by:
getJDBCMajorVersion
in interfacejava.sql.DatabaseMetaData
-
getJDBCMinorVersion
public int getJDBCMinorVersion()
- Specified by:
getJDBCMinorVersion
in interfacejava.sql.DatabaseMetaData
-
getSQLStateType
public int getSQLStateType() throws java.sql.SQLException
- Specified by:
getSQLStateType
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
locatorsUpdateCopy
public boolean locatorsUpdateCopy() throws java.sql.SQLException
- Specified by:
locatorsUpdateCopy
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
supportsStatementPooling
public boolean supportsStatementPooling() throws java.sql.SQLException
- Specified by:
supportsStatementPooling
in interfacejava.sql.DatabaseMetaData
- Throws:
java.sql.SQLException
-
-