Skip to content

Commit

Permalink
Merge branch 'BABEL_4_X_DEV' into babel-429-rds-proxy-support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharath BP committed Aug 20, 2024
2 parents 6d856fb + a66de39 commit 93862c4
Show file tree
Hide file tree
Showing 645 changed files with 221,644 additions and 2,105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
- name: Build vector Extension
run: |
cd ..
export VECTOR_VERSION="0.5.1"
export VECTOR_VERSION="0.7.2"
sudo apt-get install wget
wget https://github.com/pgvector/pgvector/archive/refs/tags/v${VECTOR_VERSION}.tar.gz
tar -xvzf v${VECTOR_VERSION}.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ runs:
mvn test
export inputFilesPath=input
for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do
sed -i "s/$filename[ ]*$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule
sed -i "s/\b$filename[ ]*\b$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule
done
export scheduleFile=upgrade/$base_dir/schedule
mvn test
Expand Down
8 changes: 7 additions & 1 deletion .github/composite-actions/run-verify-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ runs:
mvn test
export inputFilesPath=input
# Skip test BABEL-404 for previous versions while testing dump/restore since it specifies
# contraint column ordering which is expected to fail after fix for BABEL-4888
if [[ "${{ inputs.dump_restore }}" == 'true' && "${{ inputs.extension_branch }}" != 'latest' ]];then
sed -i "/BABEL-404\>/d" upgrade/$base_dir/schedule
fi
for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do
sed -i "s/$filename[ ]*$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule
sed -i "s/\b$filename[ ]*\b$/$filename-vu-verify\\n$filename-vu-cleanup/g" upgrade/$base_dir/schedule
done
export scheduleFile=upgrade/$base_dir/schedule
mvn test
Expand Down
11 changes: 9 additions & 2 deletions .github/composite-actions/setup-base-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ runs:
- name: Build vector Extension
run: |
cd ..
export VECTOR_VERSION="0.5.1"
export VECTOR_VERSION="0.7.2"
sudo apt-get install wget
wget https://github.com/pgvector/pgvector/archive/refs/tags/v${VECTOR_VERSION}.tar.gz
tar -xvzf v${VECTOR_VERSION}.tar.gz
Expand Down Expand Up @@ -192,6 +192,13 @@ runs:
export inputFilesPath=upgrade/$base_dir/preparation
mvn test
# Skip test BABEL-404 for previous versions while testing dump/restore since it specifies
# contraint column ordering which is expected to fail after fix for BABEL-4888
if [[ "${{ inputs.dump_restore }}" == 'true' && "${{ inputs.extension_branch }}" != 'latest' ]];then
sed -i "/BABEL-404\>/d" upgrade/$base_dir/schedule
fi
for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do
if [[ ! ($(find input/ -name $filename"-vu-prepare.*") || $(find input/ -name $filename"-vu-verify.*")) ]]; then
printf '%s\n' "ERROR: Cannot find Test file "$filename"-vu-prepare or "$filename"-vu-verify in input directory !!" >&2
Expand All @@ -201,7 +208,7 @@ runs:
export isUpgradeTestMode=false
export inputFilesPath=input
for filename in $(grep -v "^ignore.*\|^#.*\|^cmd.*\|^all.*\|^$" upgrade/$base_dir/schedule); do
sed -i "s/$filename[ ]*$/$filename-vu-prepare/g" upgrade/$base_dir/schedule
sed -i "s/\b$filename[ ]*\b$/$filename-vu-prepare/g" upgrade/$base_dir/schedule
done
export scheduleFile=upgrade/$base_dir/schedule
mvn test
Expand Down
26 changes: 19 additions & 7 deletions .github/configuration/upgrade-test-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ upgrade-version: [{
}
],
},
{
upgrade-path: [
{
version: '14.14',
upgrade-type: null
},
{
version: target.latest,
upgrade-type: major
}
],
},
{
upgrade-path: [
{
Expand All @@ -113,7 +125,7 @@ upgrade-version: [{
{
upgrade-path: [
{
version: 15.8,
version: 15.9,
upgrade-type: null
},
{
Expand Down Expand Up @@ -149,7 +161,7 @@ upgrade-version: [{
{
upgrade-path: [
{
version: 16.3,
version: 16.4,
upgrade-type: null
},
{
Expand All @@ -165,11 +177,11 @@ upgrade-version: [{
upgrade-type: null
},
{
version: 14.13,
version: '14.14',
upgrade-type: major
},
{
version: 15.8,
version: 15.9,
upgrade-type: major
},
{
Expand All @@ -195,7 +207,7 @@ upgrade-version: [{
{
upgrade-path: [
{
version: 15.8,
version: 15.9,
upgrade-type: null
},
{
Expand All @@ -208,7 +220,7 @@ upgrade-version: [{
{
upgrade-path: [
{
version: 15.8,
version: 15.9,
upgrade-type: null
},
{
Expand All @@ -225,7 +237,7 @@ upgrade-version: [{
upgrade-type: null
},
{
version: 15.8,
version: 15.9,
upgrade-type: minor
},
{
Expand Down
9 changes: 9 additions & 0 deletions .github/template/version-branch-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
engine_branch: BABEL_2_9_STABLE__PG_14_12
extension_branch: BABEL_2_9_STABLE
'14.13':
engine_branch: BABEL_2_10_STABLE__PG_14_13
extension_branch: BABEL_2_10_STABLE
'14.14':
engine_branch: BABEL_2_X_DEV__PG_14_X
extension_branch: BABEL_2_X_DEV
'15.2':
Expand All @@ -65,6 +68,9 @@
engine_branch: BABEL_3_6_STABLE__PG_15_7
extension_branch: BABEL_3_6_STABLE
'15.8':
engine_branch: BABEL_3_7_STABLE__PG_15_8
extension_branch: BABEL_3_7_STABLE
'15.9':
engine_branch: BABEL_3_X_DEV__PG_15_X
extension_branch: BABEL_3_X_DEV
'16.1':
Expand All @@ -76,6 +82,9 @@
'16.3':
engine_branch: BABEL_4_2_STABLE__PG_16_3
extension_branch: BABEL_4_2_STABLE
'16.4':
engine_branch: BABEL_4_3_STABLE__PG_16_4
extension_branch: BABEL_4_3_STABLE
'source.latest':
engine_branch: latest
extension_branch: latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/major-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
env:
OLD_INSTALL_DIR: psql_source
NEW_INSTALL_DIR: psql_target
ENGINE_BRANCH_FROM: BABEL_2_7_STABLE__PG_14_10
EXTENSION_BRANCH_FROM: BABEL_2_7_STABLE
ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X
EXTENSION_BRANCH_FROM: BABEL_2_X_DEV

runs-on: ubuntu-20.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/minor-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Build vector Extension
run: |
cd ..
export VECTOR_VERSION="0.5.1"
export VECTOR_VERSION="0.7.2"
sudo apt-get install wget
wget https://github.com/pgvector/pgvector/archive/refs/tags/v${VECTOR_VERSION}.tar.gz
tar -xvzf v${VECTOR_VERSION}.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/singledb-version-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
env:
OLD_INSTALL_DIR: psql_source
NEW_INSTALL_DIR: psql_target
ENGINE_BRANCH_FROM: BABEL_2_7_STABLE__PG_14_10
EXTENSION_BRANCH_FROM: BABEL_2_7_STABLE
ENGINE_BRANCH_FROM: BABEL_2_X_DEV__PG_14_X
EXTENSION_BRANCH_FROM: BABEL_2_X_DEV

runs-on: ubuntu-20.04
steps:
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ contrib/babelfishpg_tsql/antlr/antlr4cpp_generated_src/
contrib/babelfishpg_tsql/antlr/cmake_install.cmake
contrib/babelfishpg_tsql/pl_reserved_kwlist_d.h
contrib/babelfishpg_tsql/pl_unreserved_kwlist_d.h
contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9].[0-9].[0-9]--[0-9].[0-9].[0-9].sql
contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9].[0-9].[0-9].sql
contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9]*.[0-9]*.[0-9]*--[0-9]*.[0-9]*.[0-9]*.sql
contrib/babelfishpg_tsql/sql/babelfishpg_tsql--[0-9]*.[0-9]*.[0-9]*.sql
contrib/babelfishpg_tsql/src/backend_parser/gram-backend.c
contrib/babelfishpg_tsql/src/backend_parser/gram-backend.h
contrib/babelfishpg_tsql/src/backend_parser/gram-backend.output
Expand All @@ -41,4 +41,5 @@ contrib/babelfishpg_tsql/src/fts_parser.c
contrib/babelfishpg_tsql/src/fts_scan.c
contrib/babelfishpg_tsql/src/pl_gram.c
contrib/babelfishpg_tsql/src/pl_gram.h
contrib/babelfishpg_tsql/src/pl_gram.output
contrib/babelfishpg_tsql/src/pl_gram.output

1 change: 0 additions & 1 deletion contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ Build babelfishpg_unit extension if you want to run/add unit tests (Optional):
CREATE EXTENSION IF NOT EXISTS "babelfishpg_tds" CASCADE;
GRANT ALL ON SCHEMA sys to babelfish_user;
ALTER SYSTEM SET babelfishpg_tsql.database_name = 'babelfish_db';
ALTER SYSTEM SET babelfishpg_tds.set_db_session_property = true;
ALTER DATABASE babelfish_db SET babelfishpg_tsql.migration_mode = 'single-db'|'multi-db';
SELECT pg_reload_conf();
CALL SYS.INITIALIZE_BABELFISH('babelfish_user');
Expand Down
11 changes: 10 additions & 1 deletion contrib/babelfishpg_common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ GENERATED_UPGRADES = \
sql/$(EXTENSION)--3.3.0--4.0.0.sql \
sql/$(EXTENSION)--3.3.0--3.4.0.sql \
sql/$(EXTENSION)--4.0.0--4.1.0.sql \
sql/$(EXTENSION)--4.1.0--4.2.0.sql
sql/$(EXTENSION)--4.1.0--4.2.0.sql \
sql/$(EXTENSION)--4.2.0--4.3.0.sql

ifdef PREV_EXTVERSION
DATA = sql/$(EXTENSION)--$(PREV_EXTVERSION).sql
Expand Down Expand Up @@ -118,6 +119,10 @@ ifeq (,$(filter $(FLAG_TO_CHECK),$(PG_CPPFLAGS)))

sql/$(EXTENSION)--4.1.0--4.2.0.sql: sql/upgrades/babelfishpg_upgrades.in
cpp -D PREV_VERSION=4.1.0 -D CUR_VERSION=4.2.0 $< | sed 's/^# /-- /g' > $@

sql/$(EXTENSION)--4.2.0--4.3.0.sql: sql/upgrades/babelfishpg_upgrades.in
cpp -D PREV_VERSION=4.2.0 -D CUR_VERSION=4.3.0 $< | sed 's/^# /-- /g' > $@

else
# The flag is present build the .in file including the spatial type files
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).in
Expand All @@ -137,6 +142,10 @@ else

sql/$(EXTENSION)--4.1.0--4.2.0.sql: sql/upgrades/babelfishpg_upgrades.in
cpp -D ENABLE_SPATIAL_TYPES=1 -D PREV_VERSION=4.1.0 -D CUR_VERSION=4.2.0 $< | sed 's/^# /-- /g' > $@

sql/$(EXTENSION)--4.2.0--4.3.0.sql: sql/upgrades/babelfishpg_upgrades.in
cpp -D ENABLE_SPATIAL_TYPES=1 -D PREV_VERSION=4.2.0 -D CUR_VERSION=4.3.0 $< | sed 's/^# /-- /g' > $@

endif

sql/babelfishpg_common--%.sql: sql/upgrades/babelfishpg_common--%.sql
Expand Down
2 changes: 1 addition & 1 deletion contrib/babelfishpg_common/Version.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BBFPGCMN_MAJOR_VERSION=4
BBFPGCMN_MINOR_VERSION=2
BBFPGCMN_MINOR_VERSION=3
BBFPGCMN_MICRO_VERSION=0

4 changes: 2 additions & 2 deletions contrib/babelfishpg_common/sql/binary.sql
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ AS 'babelfishpg_common', 'varbinaryvarchar'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

CREATE CAST (sys.BBF_BINARY AS sys.VARCHAR)
WITH FUNCTION sys.binarysysvarchar (sys.BBF_BINARY, integer, boolean) AS ASSIGNMENT;
WITH FUNCTION sys.binarysysvarchar (sys.BBF_BINARY, integer, boolean) AS IMPLICIT;

CREATE OR REPLACE FUNCTION sys.binaryvarchar(sys.BBF_BINARY, integer, boolean)
RETURNS pg_catalog.VARCHAR
Expand Down Expand Up @@ -249,7 +249,7 @@ CREATE OPERATOR sys.>= (

CREATE FUNCTION sys.binary_lt(leftarg sys.bbf_binary, rightarg sys.bbf_binary)
RETURNS boolean
AS 'babelfishpg_common', 'varbinary_eq'
AS 'babelfishpg_common', 'varbinary_lt'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;

CREATE OPERATOR sys.< (
Expand Down
Loading

0 comments on commit 93862c4

Please sign in to comment.