Class SpannerPostgreSQLDialect
- All Implemented Interfaces:
CheckConstraintSupport, ForeignKeySupport, IdentifierSupport, KeywordSupport, LiteralSupport, AlterTableSupport, ColumnDefinitionSupport, ConstraintControlSupport, IndexDdlSupport, TableCreationSupport, TruncateSupport, CurrentTemporalSupport, TemporalFormatSupport, TemporalOperationSupport, ConversionContext
-
Field Summary
FieldsFields inherited from class PostgreSQLDialect
driverKind, MINIMUM_VERSIONFields inherited from class Dialect
LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGYFields inherited from interface ConstraintControlSupport
NONEFields inherited from interface TruncateSupport
STANDARD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether every table partition key must also occur in its primary key.voidappendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for ajava.timevalue.voidappendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for aCalendarvalue.voidappendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Append a datetime literal for a legacyDatevalue.Supplies vendor-specific SQL-exception conversion for this Dialect.castPattern(CastType from, CastType to) Obtain a pattern for the SQL equivalent to acast()function call.protected StringcastType(int sqlTypeCode) Return the complete cast-target type pattern forsqlTypeCode.protected StringcolumnType(int sqlTypeCode) protected voidcontributeDefaultProperties(Properties properties) Contribute provider configuration defaults after Dialect construction.protected voidcontributePostgreSQLTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Allow for extension points to override this onlyvoidcontributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Contribute database-specific Java, JDBC, DDL, and basic type descriptors.Render the current local-time expression.Render the current local-timestamp expression.Render the current SQL time expression used forjava.sql.Time.Render the current SQL timestamp expression used forjava.sql.Timestamp.datetimeFormat(String format) A defaultScrollModeto be used byQuery.scroll().Supply the aggregate-column mapping, DDL, read, assignment, and write behavior for this dialect.getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) Render an array type name from the independent Java element name, rendered SQL element name, and optional maximum length.Supply the callable-statement protocol for this database and JDBC driver.The common-table-expression capabilities of this Dialect.Supply current temporal expressions and database-side timestamp retrieval.Supply direct JDBC access capabilities for Java Time classes.Supply the database's finite-domain declaration, lifecycle, and check strategy.Supply thefetchclause forms accepted by this database.The database's support for recognizing primary-key functional dependency ingroup byandorder byclauses.Supplies this Dialect's global temporary-table strategy.Supply existence-check placement for schema DDL targets.getInformationExtractor(ExtractionContext extractionContext) Supply the context-bound strategy Hibernate uses to discover database tables, keys, indexes, and related schema metadata.Supplies execution-time pagination for already-rendered SQL requested byQuery.setMaxResults(int)orQuery.setFirstResult(int).Supplies this Dialect's local temporary-table strategy.getLockingClauseStrategy(QuerySpec querySpec, LockOptions lockOptions) Supplies the per-translation strategy for a statement-level [PessimisticLockStyle#CLAUSE locking clause].Supplies the cohesive pessimistic-locking profile for this Dialect.Select the Hibernate-owned fallback families used for SQM update/delete and insert operations targeting entities mapped to multiple tables.The native SQL mutation-syntax capabilities of this Dialect.Supplies the database limits forIN-expression elements and total JDBC statement parameters.Supplies the fallback persistent-table strategy used when no native local or global temporary-table strategy is selected.The database's native predicate syntax and predicate-placement profile.Supply the database's row-locator expression, JDBC type, and optional physical-column declaration policy.Supplies the complete database-native row-level-security strategy for this Dialect.The native row-value syntax of this Dialect.Supply schema-drop composition and ordered pre-drop commands.Supplies the complete sequence value-expression and lifecycle-DDL strategy for this Dialect.Supply the SQL renderings used for a reusable single-row table and for an otherwise table-less select.Supply the factory for this Dialect's single-use SQL AST translators.Supplies the database's supported subquery placements.Supply the exporter used to create and drop relational tables.Supply extraction and timestamp-arithmetic syntax.Supplies the database syntax for ordinary and distinct tuple counts.Supplies this Dialect's resolved type-sizing limits and defaults.Supply the stable strategy used for unique-key representation and DDL.The contexts in which this Dialect supports native multi-rowvaluessyntax.Supplies the native window-function syntax supported by this database.voidinitializeFunctionRegistry(FunctionContributions functionContributions) Contribute the database-specific function descriptors after independent function contributors have run.protected voidregisterArrayFunctions(CommonFunctionFactory functionFactory) protected voidregisterJsonFunction(CommonFunctionFactory functionFactory) protected voidregisterPostgreSQLColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) protected voidregisterUtilityFunctions(FunctionContributions functionContributions) protected voidregisterXmlFunctions(CommonFunctionFactory functionFactory) renderCommands(TruncateRequest request) protected IntegerresolveSqlTypeCode(String columnTypeName, TypeConfiguration typeConfiguration) Resolve a database-reported type name before base-name extraction.booleanWhether this database supports native aggregatefilter (where ...)syntax.booleanWhether mapped aggregate structures may be represented as database user-defined types.timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Return a timestamp-add pattern containing?1,?2, and?3.timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Return a timestamp-difference pattern containing?1,?2, and?3.booleanMethods inherited from class PostgreSQLDialect
alterColumnType, appendBinaryLiteral, appendBooleanValueString, appendDefinition, appendFormat, augmentRecognizedTableTypes, buildIdentifierHelper, causesRollback, createOptionalTableUpdateOperation, currentTimestampWithTimeZone, extractPattern, fractionalSecondPrecisionInNanos, getArraySupport, getCurrentTimestampSelection, getDefaultOrdinalityColumnName, getDmlTargetColumnQualifierSupport, getDriverKind, getGeneratedValuesSupport, getIdentityColumnSupport, getLobSupport, getMaxIdentifierLength, getMinimumSupportedVersion, getNameQualifierSupport, getNamespaceSupport, getNationalizationSupport, getNativeParameterMarkerStrategy, getNativeValueGenerationStrategy, getObjectNullBindingStrategy, getQueryHintPlacement, getQueryHintString, getRefCursorSupportFactory, getSchemaCommentSupport, getSelectClauseNullString, getSequenceInformationExtractor, getTemporalFormatSupport, getTemporalTableSupport, getTemporalValueSemantics, getTimeZoneSupport, getUserDefinedTypeExporter, getViolatedConstraintNameExtractor, isCurrentTimestampStable, nameQualification, quoteCollation, registerColumnTypes, resolveSqlTypeDescriptor, supportsMinMaxOnUuid, translateExtractFieldMethods inherited from class Dialect
appendArrayLiteral, augmentPhysicalTableTypes, buildLockingClauseStrategy, buildStringToBooleanCast, buildStringToBooleanCastDecode, constraintControlMode, contributeKeywords, determineDatabaseVersion, equivalentTypes, getAlterTableSupport, getBatchLoadSizingStrategy, getCatalogSeparator, getCheckConstraintSupport, getColumnAliasExtractor, getColumnDefinitionSupport, getConstraintControlSupport, getDefaultProperties, getEntityLockingStrategyFactory, getExpressionCoercionSupport, getForeignKeyExporter, getForeignKeySupport, getIdentifierSupport, getIndexDdlSupport, getIndexExporter, getJdbcMetadataOverrides, getKeywords, getKeywordSupport, getLiteralSupport, getLobMergeStrategy, getLowercaseFunction, getMultiKeyLoadSizingStrategy, getNullOrderingSupport, getPreferredSqlTypeCodeForArray, getPreferredSqlTypeCodeForBoolean, getQueryHintString, getSchemaNameResolver, getSequenceExporter, getSetOperationSupport, getSetOperatorSqlString, getSizeStrategy, getStringValueSemantics, getSyntheticTableGroupSupport, getTableCleaner, getTableCreationSupport, getTableMigrator, getTemporaryTableExporter, getTruncateSupport, getVersion, isJdbcLogWarningsEnabledByDefault, narrowCastType, resolveSqlTypeCode, resolveSqlTypeLength, supportsCrossJoin, supportsNationalizedMethods, supportsOrdinalSelectItemReference, throttleDdl, toString, trimPatternMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AlterTableSupport
addColumnPrefix, addColumnSuffix, alterTableCommandMethods inherited from interface CheckConstraintSupport
render, supportsMethods inherited from interface ConstraintControlSupport
disableCommands, disableConstraintCommands, enableCommands, enableConstraintCommandsMethods inherited from interface CurrentTemporalSupport
currentDate, currentTimestampWithTimeZone, getCurrentTimestampSelection, isCurrentTimestampStable, usesStandardCurrentTimestampFunctionMethods inherited from interface ForeignKeySupport
renderDropConstraint, requiresSelfReferentialForeignKeyNullification, supportsAlterTableConstraints, supportsOnDeleteActionMethods inherited from interface IdentifierSupport
closeQuote, getMaxAliasLength, openQuote, quote, toQuotedIdentifierMethods inherited from interface IndexDdlSupport
createCommand, createTailMethods inherited from interface KeywordSupport
acceptsJdbcKeywordMethods inherited from interface LiteralSupport
appendIntervalLiteral, appendIntervalLiteral, appendLiteral, appendUUIDLiteral, toBooleanValueStringMethods inherited from interface TableCreationSupport
createTableCommand, requiresViewColumnList, tableCreationOptionsMethods inherited from interface TemporalOperationSupport
extractPattern, fractionalSecondPrecisionInNanos, translateDurationField, translateExtractField
-
Field Details
-
MINIMUM_POSTGRES_VERSION
-
-
Constructor Details
-
SpannerPostgreSQLDialect
public SpannerPostgreSQLDialect() -
SpannerPostgreSQLDialect
-
SpannerPostgreSQLDialect
-
-
Method Details
-
getDirectJavaTimeJdbcSupport
Description copied from class:DialectSupply direct JDBC access capabilities for Java Time classes. Return one stable, non-null, thread-safe implementation.- Overrides:
getDirectJavaTimeJdbcSupportin classPostgreSQLDialect- Returns:
- the direct Java Time JDBC support for this Dialect and driver
- See Also:
-
getTemporalOperationSupport
Description copied from class:DialectSupply extraction and timestamp-arithmetic syntax. Return one stable, non-null, thread-safe implementation. Providers may implementTemporalOperationSupportdirectly and returnthis.- Overrides:
getTemporalOperationSupportin classPostgreSQLDialect- See Also:
-
getCurrentTemporalSupport
Description copied from class:DialectSupply current temporal expressions and database-side timestamp retrieval. Return one stable, non-null, thread-safe implementation. Providers may implementCurrentTemporalSupportdirectly and returnthis.- Overrides:
getCurrentTemporalSupportin classPostgreSQLDialect- See Also:
-
getTypeSizingProfile
Description copied from class:DialectSupplies this Dialect's resolved type-sizing limits and defaults.
Return
TypeSizingProfile.STANDARDwhen no dimension differs. Construct one stable immutable profile after version and server configuration are known. A family Dialect may copy its superclass profile, but must set every effective dimension which formerly changed through scalar-method delegation because profile builder setters do not cascade.- Overrides:
getTypeSizingProfilein classPostgreSQLDialect
-
initializeFunctionRegistry
@SPI({IMPLEMENT,SUPPLY}) public void initializeFunctionRegistry(FunctionContributions functionContributions) Description copied from class:DialectContribute the database-specific function descriptors after independent function contributors have run.
Override this callback to extend or replace the inherited function set. Invoke
superfirst to retain Hibernate's standard and emulated registrations; omitting it deliberately replaces that set. Mutate the supplied boot-scoped function registry only during this callback, and do not retain the contribution context or registry afterward. Implement an independentFunctionContributorinstead when the contribution is not owned by a Dialect.- Overrides:
initializeFunctionRegistryin classPostgreSQLDialect- Parameters:
functionContributions- the Hibernate-supplied function contribution target- See Also:
-
registerJsonFunction
- Overrides:
registerJsonFunctionin classPostgreSQLDialect
-
registerArrayFunctions
- Overrides:
registerArrayFunctionsin classPostgreSQLDialect
-
registerXmlFunctions
- Overrides:
registerXmlFunctionsin classPostgreSQLDialect
-
registerUtilityFunctions
- Overrides:
registerUtilityFunctionsin classPostgreSQLDialect
-
contributeDefaultProperties
Description copied from class:DialectContribute provider configuration defaults after Dialect construction.
Invoke
superfirst to extend the inherited defaults. Omittingsuperdeliberately replaces them. Mutate the supplied isolated property bag only during this callback; do not retain it or callDialect.getDefaultProperties()from a Dialect constructor.- Overrides:
contributeDefaultPropertiesin classPostgreSQLDialect- Parameters:
properties- the isolated contribution target
-
getArrayTypeName
@SPI({USE,IMPLEMENT}) public String getArrayTypeName(String javaElementTypeName, String elementTypeName, Integer maxLength) Description copied from class:DialectRender an array type name from the independent Java element name, rendered SQL element name, and optional maximum length.
Return null when array types are unsupported. The standard forms are
element arrayandelement array[length].- Overrides:
getArrayTypeNamein classDialect
-
getTableExporter
Description copied from class:DialectSupply the exporter used to create and drop relational tables.
Return one stable exporter owned by this Dialect. Prefer
StandardTableExporterwhen only its focused table-DDL template hooks are needed.- Overrides:
getTableExporterin classPostgreSQLDialect
-
getUniqueDelegate
Description copied from class:DialectSupply the stable strategy used for unique-key representation and DDL.
Return a stock profile from
UniqueDelegates, or a stable provider-owned implementation or decorator. Do not import a Hibernate.internalleaf.- Overrides:
getUniqueDelegatein classPostgreSQLDialect- See Also:
-
getSequenceSupport
Description copied from class:DialectSupplies the complete sequence value-expression and lifecycle-DDL strategy for this Dialect.
Return the same stable, thread-safe strategy for the Dialect's lifetime. Use
SequenceSupports.none()when sequences are unsupported, select one of the other stock strategies only when its complete grammar matches the database, or supply a provider implementation ofSequenceSupport.- Overrides:
getSequenceSupportin classPostgreSQLDialect- Returns:
- the non-null sequence-support strategy
- See Also:
-
getRowLevelSecurity
Description copied from class:DialectSupplies the complete database-native row-level-security strategy for this Dialect.
Return the same stable, thread-safe strategy for the Dialect's lifetime. Use
RowLevelSecurityStrategies.none()when native row-level security is unsupported, and return declarative DDL instead of mutating boot metadata.- Overrides:
getRowLevelSecurityin classPostgreSQLDialect- Returns:
- the non-null row-level-security strategy
- See Also:
-
getLimitHandler
Description copied from class:DialectSupplies execution-time pagination for already-rendered SQL requested by
Query.setMaxResults(int)orQuery.setFirstResult(int).This is distinct from SQL AST
PaginationRenderingSupport, which handles offset and fetch clauses represented in the semantic tree. A custom Dialect should normally return a stockLimitHandleror extend a supported handler family. The returned handler may be reused concurrently and must not retain per-query state.- Overrides:
getLimitHandlerin classPostgreSQLDialect- Returns:
- a non-null handler
-
getEnumSupport
Description copied from class:DialectSupply the database's finite-domain declaration, lifecycle, and check strategy. Return one stable, thread-safe strategy for this Dialect.- Overrides:
getEnumSupportin classPostgreSQLDialect- Returns:
- the non-null enum support strategy
- See Also:
-
getAggregateSupport
Description copied from class:DialectSupply the aggregate-column mapping, DDL, read, assignment, and write behavior for this dialect. Override this method to return a provider implementation ofAggregateSupport, or retain the standard behavior returned by the default.- Overrides:
getAggregateSupportin classPostgreSQLDialect- Returns:
- this dialect's aggregate support
- See Also:
-
getLockingSupport
Description copied from class:DialectSupplies the cohesive pessimistic-locking profile for this Dialect.
The profile coordinates capability metadata, statement-clause rendering, table hints, already-rendered SQL rewriting, connection timeout handling, and follow-on locking. A custom Dialect should supply one internally consistent profile instead of overriding those behaviors independently. The returned support must be non-null and stable for the Dialect lifetime; its components may be reused concurrently and must not retain per-query requests.
- Overrides:
getLockingSupportin classPostgreSQLDialect- See Also:
-
resolveSqlTypeCode
@SPI({USE,IMPLEMENT}) protected Integer resolveSqlTypeCode(String columnTypeName, TypeConfiguration typeConfiguration) Description copied from class:DialectResolve a database-reported type name before base-name extraction.
columnTypeNameis complete and may include parameters or an array suffix. Return null when it cannot be resolved.- Overrides:
resolveSqlTypeCodein classPostgreSQLDialect
-
getFetchClauseSupport
Description copied from class:DialectSupply the
fetchclause forms accepted by this database.Return one non-null immutable profile whose identity and answers remain stable for this Dialect's lifetime. The four forms are independent; do not infer percent or ties support from ordinary row-count support.
- Overrides:
getFetchClauseSupportin classPostgreSQLDialect- Returns:
- the stable
fetchclause capability profile - See Also:
-
getLockingClauseStrategy
Description copied from class:DialectSupplies the per-translation strategy for a statement-level [PessimisticLockStyle#CLAUSE locking clause].- Overrides:
getLockingClauseStrategyin classDialect- See Also:
-
contributeTypes
@SPI({IMPLEMENT,SUPPLY}) public void contributeTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Description copied from class:DialectContribute database-specific Java, JDBC, DDL, and basic type descriptors.
Override this method when the database or JDBC driver requires descriptors beyond the inherited registrations. Invoke
superfirst unless the Dialect intentionally replaces the complete inherited contribution protocol. Obtain reusable dialect-specific JDBC descriptors from the family facades inorg.hibernate.dialect.type.spi, and preserve whether a descriptor replaces an existing registration or is added only when absent.- Overrides:
contributeTypesin classPostgreSQLDialect- Parameters:
typeContributions- the Hibernate-supplied contribution registryserviceRegistry-the Hibernate-supplied services, including class loading used by driver-backed descriptor factories
Mutate the supplied boot-scoped registries only during this callback and do not retain the contribution context or a mutable registry afterward. Implement an independent
TypeContributorinstead when the contribution is not owned by a Dialect.
-
getFunctionalDependencyAnalysisSupport
@SPI({IMPLEMENT,SUPPLY}) public FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSupport()Description copied from class:DialectThe database's support for recognizing primary-key functional dependency in
group byandorder byclauses.This profile controls when Hibernate may omit functionally dependent columns. Report only behavior guaranteed by the database across the Dialect's supported versions.
- Overrides:
getFunctionalDependencyAnalysisSupportin classPostgreSQLDialect- Returns:
- a non-null immutable capability profile
- See Also:
-
contributePostgreSQLTypes
protected void contributePostgreSQLTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) Description copied from class:PostgreSQLDialectAllow for extension points to override this only- Overrides:
contributePostgreSQLTypesin classPostgreSQLDialect
-
getSqlAstTranslatorFactory
Description copied from class:DialectSupply the factory for this Dialect's single-use SQL AST translators.
Return
nullto useStandardSqlAstTranslatorFactory. A custom Dialect should normally return a reusable factory derived from that class and create translators derived fromAbstractSqlAstTranslatoror an appropriate supported family base. The factory must not retain translation requests, and every translator it returns is used for one translation.- Overrides:
getSqlAstTranslatorFactoryin classPostgreSQLDialect- See Also:
-
registerPostgreSQLColumnTypes
protected void registerPostgreSQLColumnTypes(TypeContributions typeContributions, ServiceRegistry serviceRegistry) - Overrides:
registerPostgreSQLColumnTypesin classPostgreSQLDialect
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, TemporalAccessor temporalAccessor, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a
java.timevalue.Preserve the value's offset only when the Dialect's temporal-value semantics permit it. Append immediately and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, Date date, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a legacy
Datevalue.Apply the supplied JDBC time zone where required, append immediately, and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
appendDateTimeLiteral
@SPI({USE,IMPLEMENT}) public void appendDateTimeLiteral(SqlAppender appender, Calendar calendar, TemporalType precision, TimeZone jdbcTimeZone) Description copied from class:DialectAppend a datetime literal for a
Calendarvalue.Preserve Calendar-specific time-zone and millisecond semantics, append immediately, and retain no invocation state.
- Specified by:
appendDateTimeLiteralin interfaceLiteralSupport- Overrides:
appendDateTimeLiteralin classPostgreSQLDialect
-
castType
Description copied from class:DialectReturn the complete cast-target type pattern for
sqlTypeCode.Override this hook when cast syntax differs from column declaration syntax; otherwise delegate to
Dialect.columnType(int).- Overrides:
castTypein classPostgreSQLDialect
-
timestampaddPattern
@SPI({USE,IMPLEMENT}) public String timestampaddPattern(TemporalUnit unit, TemporalType temporalType, IntervalType intervalType) Description copied from interface:TemporalOperationSupportReturn a timestamp-add pattern containing?1,?2, and?3.- Specified by:
timestampaddPatternin interfaceTemporalOperationSupport- Overrides:
timestampaddPatternin classPostgreSQLDialect
-
timestampdiffPattern
@SPI({USE,IMPLEMENT}) public String timestampdiffPattern(TemporalUnit unit, TemporalType fromTemporalType, TemporalType toTemporalType) Description copied from interface:TemporalOperationSupportReturn a timestamp-difference pattern containing?1,?2, and?3.- Specified by:
timestampdiffPatternin interfaceTemporalOperationSupport- Overrides:
timestampdiffPatternin classPostgreSQLDialect
-
castPattern
Description copied from class:DialectObtain a pattern for the SQL equivalent to acast()function call. The resulting pattern must contain ?1 and ?2 placeholders for the arguments.- Overrides:
castPatternin classPostgreSQLDialect- Parameters:
from- aCastTypeindicating the type of the value argumentto- aCastTypeindicating the type the value argument is cast to
-
columnType
Description copied from class:DialectReturn the complete database column declaration pattern for a JDBC
Typesor HibernateSqlTypescode used during type registration.Use only
$l,$p, and$sfor length, precision, and scale. Define distinct mappings for theLONG32codes; the JDBCLONGsynonyms are normalized before this hook. Delegate unknown inherited codes to the superclass so its standard exception remains authoritative.- Overrides:
columnTypein classPostgreSQLDialect
-
defaultScrollMode
Description copied from class:DialectA defaultScrollModeto be used byQuery.scroll().- Overrides:
defaultScrollModein classDialect- Returns:
- the default
ScrollModeto use.
-
getTupleCountSupport
Description copied from class:DialectSupplies the database syntax for ordinary and distinct tuple counts.
Return one non-null, immutable profile whose values remain stable for this Dialect's lifetime. Select
TupleCountSupport.Syntax.UNSUPPORTEDto use Hibernate's existing emulation,TupleCountSupport.Syntax.ARGUMENT_LISTfor syntax such ascount(a, b), orTupleCountSupport.Syntax.PARENTHESIZED_TUPLEfor syntax such ascount((a, b)). Configure the ordinary and distinct forms independently; a database may require different forms for them. When refining a family Dialect, copyDialect.getTupleCountSupport()from the superclass and replace only the differing syntax choice.- Overrides:
getTupleCountSupportin classPostgreSQLDialect- Returns:
- the non-null tuple-count-syntax profile
-
getWindowFunctionSupport
Description copied from class:DialectSupplies the native window-function syntax supported by this database.
Return one non-null, immutable profile whose values remain stable for this Dialect's lifetime. Baseline window calls, window partitioning, each frame unit, and frame exclusion are independent grammar facts. Every refinement requires baseline window support, and frame exclusion additionally requires a supported frame unit. Function-specific restrictions and individual frame-bound restrictions remain the responsibility of focused rendering.
When refining a family Dialect, start from
WindowFunctionSupport.builder(super.getWindowFunctionSupport())and change only the differing features.- Overrides:
getWindowFunctionSupportin classPostgreSQLDialect- Returns:
- this Dialect's stable window-function-support profile
-
supportsUserDefinedTypes
Description copied from class:DialectWhether mapped aggregate structures may be represented as database user-defined types.
This capability is independent of
Dialect.getUserDefinedTypeExporter(), which supplies schema commands for any UDT definitions that are present.- Overrides:
supportsUserDefinedTypesin classPostgreSQLDialect- See Also:
-
supportsFilterClause
public boolean supportsFilterClause()Description copied from class:DialectWhether this database supports native aggregate
filter (where ...)syntax.Return a stable answer for this Dialect's lifetime. A false result directs aggregate rendering to use the existing case-expression emulation; it does not mean that filtered aggregates are unsupported.
- Overrides:
supportsFilterClausein classPostgreSQLDialect
-
getRowValueSupport
Description copied from class:DialectThe native row-value syntax of this Dialect.
Override this method to supply explicit
row(a, b)construction, row equality, ordering, and distinctness comparisons, row-valuedINlists, row-valuedINsubqueries, and quantified row comparisons. Treat each feature as an exact native-syntax declaration: do not inferIN-subquery support fromIN-list support or explicit row construction from comparison support. Copy the superclass profile when refining an inherited Dialect family. Return one immutable, non-null profile whose values remain stable for the lifetime of this Dialect.- Overrides:
getRowValueSupportin classPostgreSQLDialect- Returns:
- this Dialect's stable row-value-support profile
-
getValuesListSupport
Description copied from class:DialectThe contexts in which this Dialect supports native multi-row
valuessyntax.The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Report only native syntax support; translator emulation is selected separately.
- Overrides:
getValuesListSupportin classPostgreSQLDialect
-
getPredicateSupport
Description copied from class:DialectThe database's native predicate syntax and predicate-placement profile.
Override this method to supply independent support for a native case-insensitive-
likeoperator, scalardistinct from, truthness predicates, and predicates used as value expressions. An absent case-insensitive-likeoperator selects Hibernate's lowercase-expression emulation. Return one immutable, non-null profile whose values remain stable for the lifetime of this Dialect; do not override individual consumers to reproduce these decisions.- Overrides:
getPredicateSupportin classPostgreSQLDialect- Returns:
- this Dialect's stable predicate-support profile
-
currentTimestamp
Description copied from interface:CurrentTemporalSupportRender the current SQL timestamp expression used forjava.sql.Timestamp.- Specified by:
currentTimestampin interfaceCurrentTemporalSupport- Overrides:
currentTimestampin classPostgreSQLDialect
-
currentTime
Description copied from interface:CurrentTemporalSupportRender the current SQL time expression used forjava.sql.Time.- Specified by:
currentTimein interfaceCurrentTemporalSupport- Overrides:
currentTimein classPostgreSQLDialect
-
currentLocalTimestamp
Description copied from interface:CurrentTemporalSupportRender the current local-timestamp expression.- Specified by:
currentLocalTimestampin interfaceCurrentTemporalSupport
-
currentLocalTime
Description copied from interface:CurrentTemporalSupportRender the current local-time expression.- Specified by:
currentLocalTimein interfaceCurrentTemporalSupport
-
getSubquerySupport
Description copied from class:DialectSupplies the database's supported subquery placements.
Return one non-null, immutable profile whose values remain stable for this Dialect's lifetime. Declare every placement independently. In particular, scalar subqueries in the select list and
existspredicates in the select list are separate capabilities. Lateral spelling and fallback rendering remain translator responsibilities. When refining a family Dialect, start fromSubquerySupport.builder(super.getSubquerySupport())and change only the differing placements.- Overrides:
getSubquerySupportin classPostgreSQLDialect- Returns:
- this Dialect's stable subquery-support profile
-
getMutationSyntaxSupport
Description copied from class:DialectThe native SQL mutation-syntax capabilities of this Dialect.
The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Report syntax which the translator may use directly; do not report a capability merely because it can be emulated.
QueryMutationRenderingSupportconsumes this profile when selecting a native or emulated plan.- Overrides:
getMutationSyntaxSupportin classPostgreSQLDialect
-
getParameterLimits
Description copied from class:DialectSupplies the database limits for
IN-expression elements and total JDBC statement parameters.Return a non-null, immutable profile whose values remain stable for this Dialect's lifetime. Use
ParameterLimits.UNLIMITEDwhen neither limit applies andParameterLimits.of(int)when both limits are identical. Keep the dimensions independent when the database imposes different expression and statement limits; Hibernate uses them for different planning decisions.- Overrides:
getParameterLimitsin classDialect- Returns:
- the non-null parameter-limit profile
-
renderAddConstraint
- Specified by:
renderAddConstraintin interfaceForeignKeySupport
-
truncateMode
- Specified by:
truncateModein interfaceTruncateSupport- Overrides:
truncateModein classPostgreSQLDialect
-
renderCommands
- Specified by:
renderCommandsin interfaceTruncateSupport- Overrides:
renderCommandsin classPostgreSQLDialect
-
getSchemaDropSupport
Description copied from class:DialectSupply schema-drop composition and ordered pre-drop commands.
Return one immutable profile for this Dialect's lifetime.
- Overrides:
getSchemaDropSupportin classPostgreSQLDialect- See Also:
-
getIfExistsSupport
Description copied from class:DialectSupply existence-check placement for schema DDL targets.
Return one immutable profile for this Dialect's lifetime.
- Overrides:
getIfExistsSupportin classPostgreSQLDialect- See Also:
-
addPartitionKeyToPrimaryKey
Description copied from class:DialectWhether every table partition key must also occur in its primary key.
Return
trueonly when the database requires the rule for both ordinary and temporal-history tables. This has nothing to do with window-function partitioning.- Overrides:
addPartitionKeyToPrimaryKeyin classPostgreSQLDialect
-
getSingleRowTableSupport
Description copied from class:DialectSupply the SQL renderings used for a reusable single-row table and for an otherwise table-less select.
Override this method with one stable, non-null profile when either rendering differs from
SingleRowTableSupport.STANDARD. The table expression and the complete select-onlyfromfragment are independent; an empty fragment means that nofromclause is required. Dialect subclasses refining a family profile should copyDialect.getSingleRowTableSupport()from the superclass and change only the values which differ.- Overrides:
getSingleRowTableSupportin classDialect- Returns:
- the stable, non-null single-row-table-support profile
-
datetimeFormat
- Overrides:
datetimeFormatin classPostgreSQLDialect
-
getCteSupport
Description copied from class:DialectThe common-table-expression capabilities of this Dialect.
The returned immutable profile must be non-null and stable for the lifetime of this Dialect. Hibernate may cache and reuse it. Overrides may construct a new profile or copy
CteSupport.STANDARD; invokingsuperis not required. This method is called only after Dialect construction, has no corresponding shutdown lifecycle, and failures propagate to the operation which obtains the profile.- Overrides:
getCteSupportin classPostgreSQLDialect
-
getInformationExtractor
@SPI({IMPLEMENT,SUPPLY}) public InformationExtractor getInformationExtractor(ExtractionContext extractionContext) Description copied from class:DialectSupply the context-bound strategy Hibernate uses to discover database tables, keys, indexes, and related schema metadata.
Return a new extractor for
extractionContext. Prefer a stock profile fromInformationExtractors, and implementInformationExtractordirectly only when none of those complete profiles matches the database.- Overrides:
getInformationExtractorin classPostgreSQLDialect- See Also:
-
getMultiTableMutationSupport
Description copied from class:DialectSelect the Hibernate-owned fallback families used for SQM update/delete and insert operations targeting entities mapped to multiple tables.
A custom Dialect should return one of the named profiles when both operation families use the same strategy kind, or construct an asymmetric profile when they differ. Local, global, and persistent-table selections require the corresponding non-null temporary-table strategy, while
CTErequires non-query CTE support.Configured global and entity-specific custom strategies take precedence over this fallback. Supply a custom execution implementation with
QuerySettings.QUERY_MULTI_TABLE_MUTATION_STRATEGYorQuerySettings.QUERY_MULTI_TABLE_INSERT_STRATEGYinstead of depending on Hibernate's internal fallback implementations.- Overrides:
getMultiTableMutationSupportin classPostgreSQLDialect- Returns:
- a stable, non-null fallback selection profile
-
getRowIdSupport
Description copied from class:DialectSupply the database's row-locator expression, JDBC type, and optional physical-column declaration policy.- Overrides:
getRowIdSupportin classPostgreSQLDialect- Returns:
- the stable non-null row-id strategy
- See Also:
-
getLocalTemporaryTableStrategy
Description copied from class:DialectSupplies this Dialect's local temporary-table strategy.
Return
nullwhen the database has no supported local temporary-table form. A non-null strategy must be stable for the Dialect lifetime and consistent withDialect.getTemporaryTableExporter().- Overrides:
getLocalTemporaryTableStrategyin classPostgreSQLDialect
-
getGlobalTemporaryTableStrategy
Description copied from class:DialectSupplies this Dialect's global temporary-table strategy.
Return
nullwhen the database has no supported global temporary-table form. A non-null strategy must be stable for the Dialect lifetime and consistent withDialect.getTemporaryTableExporter().- Overrides:
getGlobalTemporaryTableStrategyin classDialect
-
getPersistentTemporaryTableStrategy
Description copied from class:DialectSupplies the fallback persistent-table strategy used when no native local or global temporary-table strategy is selected.
The returned strategy must be non-null and must describe behavior consistent with
Dialect.getTemporaryTableExporter().- Overrides:
getPersistentTemporaryTableStrategyin classDialect
-
buildSQLExceptionConversionDelegate
@SPI({IMPLEMENT,SUPPLY}) public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()Description copied from class:DialectSupplies vendor-specific SQL-exception conversion for this Dialect.
The returned delegate runs in addition to Hibernate's standard JDBC exception-hierarchy and SQL-state delegates. Its
nullresult means that it declined the exception so conversion may continue. Returnnullfrom this method when the Dialect has no vendor-specific delegate.Prefer stable vendor error codes or SQL states and preserve the original
SQLException.- Overrides:
buildSQLExceptionConversionDelegatein classPostgreSQLDialect- Returns:
- the vendor conversion delegate, or
nullwhen none is supplied - See Also:
-
getCallableStatementSupport
Description copied from class:DialectSupply the callable-statement protocol for this database and JDBC driver.
Return one non-null strategy whose behavior remains stable for this Dialect's lifetime. Use
CallableStatementSupportsfor the standard and stock database protocols.- Overrides:
getCallableStatementSupportin classPostgreSQLDialect- Returns:
- the callable-statement strategy
- See Also:
-
useIntegerForPrimaryKey
public boolean useIntegerForPrimaryKey()
-