Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docker_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ mariadb_setup() {
}

postgresql() {
postgresql_17
postgresql_18
}

postgresql_13() {
Expand Down Expand Up @@ -262,6 +262,14 @@ postgresql_17() {
postgresql_setup
}

postgresql_18() {
$CONTAINER_CLI rm -f postgres || true
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 --tmpfs /var/lib/postgresql -d ${DB_IMAGE_POSTGRESQL_17:-docker.io/postgis/postgis:18-3.6} \
-c fsync=off -c synchronous_commit=off -c full_page_writes=off -c shared_buffers=256MB -c maintenance_work_mem=256MB -c max_wal_size=1GB -c checkpoint_timeout=1d
$CONTAINER_CLI exec postgres bash -c '/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && apt install -y postgresql-18-pgvector'
postgresql_setup
}

postgresql_setup() {
databases=()
for n in $(seq 1 $DB_COUNT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
functionFactory.initcap();
functionFactory.substr();
functionFactory.substring_substr();
functionFactory.reverse();
//also natively supports ANSI-style substring()
functionFactory.translate();
functionFactory.toCharNumberDateTimestamp();
Expand Down Expand Up @@ -917,6 +918,13 @@ public boolean supportsCaseInsensitiveLike() {
return true;
}

@Override
public String generatedAs(String generatedAs) {
return getVersion().isSameOrAfter( 18 )
? " generated always as (" + generatedAs + ")"
: super.generatedAs( generatedAs );
}

@Override
public GenerationType getNativeValueGenerationStrategy() {
return GenerationType.SEQUENCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ public void initializeFunctionRegistry(FunctionContributions functionContributio
functionFactory.substr();
functionFactory.substring_substr();
//also natively supports ANSI-style substring()
functionFactory.reverse();
functionFactory.translate();
functionFactory.toCharNumberDateTimestamp();
functionFactory.concat_pipeOperator( "convert_from(lo_get(?1),pg_client_encoding())" );
Expand Down Expand Up @@ -897,6 +898,13 @@ public boolean supportsCaseInsensitiveLike() {
return true;
}

@Override
public String generatedAs(String generatedAs) {
return getVersion().isSameOrAfter( 18 )
? " generated always as (" + generatedAs + ")"
: super.generatedAs( generatedAs );
}

@Override
public GenerationType getNativeValueGenerationStrategy() {
return GenerationType.SEQUENCE;
Expand Down