We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19dcec6 commit cacb384Copy full SHA for cacb384
1 file changed
common.mk
@@ -8,7 +8,7 @@ PG_CONFIG = pg_config
8
PG_CONFIG_EXISTS := $(shell command -v $(PG_CONFIG) 2> /dev/null)
9
ifdef PG_CONFIG_EXISTS
10
# Default to pg_config's advertised version
11
-PG_VERSION ?= $(shell $(PG_CONFIG) --version | cut -d' ' -f2 | cut -d'.' -f1 | tr -d 'devel')
+PG_VERSION ?= $(shell $(PG_CONFIG) --version | sed 's/PostgreSQL \([0-9]*\).*/\1/g')
12
else
13
# pg_config is not present, let's assume we are packaging and use the latest PG version
14
PG_VERSION ?= $(lastword $(PG_VERSIONS))
0 commit comments