Also fix future issue that bdr wouldn't detect 9.4.0+ properly.
pgac_pg_config_version=$($PG_CONFIG --version 2>/dev/null)
version_num=$(echo "$pgac_pg_config_version"|
- $SED -e 's/^PostgreSQL \([0-9]\+\)\.\([0-9]\+\)\([a-zA-Z0-9]\+\)$/\1.\2/')
-version_add=$(echo "$pgac_pg_config_version"|
- $SED -e 's/^PostgreSQL \([0-9]\+\)\.\([0-9]\+\)\([a-zA-Z0-9]\+\)$/\3/')
+ $SED -e 's/^PostgreSQL \([0-9]*\)\.\([0-9]*\)\([a-zA-Z0-9.]*\)$/\1.\2/')
if test "$version_num" != '9.4'; then
as_fn_error $? "bdr is not compatible with postgres $version_num" "$LINENO" 5
pgac_pg_config_version=$($PG_CONFIG --version 2>/dev/null)
version_num=$(echo "$pgac_pg_config_version"|
- $SED -e 's/^PostgreSQL \([[0-9]]\+\)\.\([[0-9]]\+\)\([[a-zA-Z0-9]]\+\)$/\1.\2/')
-version_add=$(echo "$pgac_pg_config_version"|
- $SED -e 's/^PostgreSQL \([[0-9]]\+\)\.\([[0-9]]\+\)\([[a-zA-Z0-9]]\+\)$/\3/')
+ $SED -e 's/^PostgreSQL \([[0-9]]*\)\.\([[0-9]]*\)\([[a-zA-Z0-9.]]*\)$/\1.\2/')
if test "$version_num" != '9.4'; then
AC_MSG_ERROR([bdr is not compatible with postgres $version_num])