Blob Blame History Raw
diff --git a/extconf.rb b/extconf.rb
index 7786692..b7162d3 100755
--- a/extconf.rb
+++ b/extconf.rb
@@ -117,7 +117,9 @@ if have_func("rb_hash_delete", "ruby.h")
 end
 
 case version_str = `#{pg_config} --version`
-when /^PostgreSQL ([7-9])\.([0-9]{1,3})(\.[0-9]{1,3})?$/
+when /^PostgreSQL ([7-9]|[1-9][0-9])\.([0-9]{1,3})(\.[0-9]{1,3})?$/
+   # TODO: note that this is broken anyway for '$2 > 9', e.g. 9.13
+   # means 9*10 + 13 -> 103, which is >= 100 (10.0)
    version = 10 * $1.to_i + $2.to_i
 else
    version = 0