Skip to content

Commit a368821

Browse files
adhameedkraj
authored andcommitted
postgresql: Update the regex to determine PGMAJORVERSION to match v10+ database clusters
Older versions of postgresql would generate MAJVER.MINVER in new clusters. 10+ do not. Update the regex to determine PGMAJORVERSION as a single int. Signed-off-by: Khem Raj <[email protected]>
1 parent d183435 commit a368821

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

meta-oe/recipes-dbs/postgresql/files/postgresql.init

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# PGVERSION is the full package version, e.g., 8.4.0
1515
# Note: the specfile inserts the correct value during package build
1616
PGVERSION=9.2.4
17-
# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
18-
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
17+
# PGMAJORVERSION is major version, e.g., 10 (this should match PG_VERSION)
18+
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\).*$/\1/'`
1919

2020
# Source function library.
2121
. /etc/init.d/functions

0 commit comments

Comments
 (0)