From 4fbfd9e5223855690f6b30b876d8e4eb658aeb8e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Wed, 22 Aug 2018 10:52:01 +0200 Subject: [PATCH] Refrain from using regexp_match() function, introduced in Pg10. Instead use the substring() function which has been there all along. See #813. --- src/pgsql/sql/list-all-columns.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pgsql/sql/list-all-columns.sql b/src/pgsql/sql/list-all-columns.sql index 8875c4d..11be443 100644 --- a/src/pgsql/sql/list-all-columns.sql +++ b/src/pgsql/sql/list-all-columns.sql @@ -9,9 +9,9 @@ with seqattr as adnum, adsrc, case when adsrc ~~ 'nextval' - then (regexp_match(pg_get_expr(d.adbin, d.adrelid), - '''([^'']+)''') - )[1]::regclass::oid + then substring(pg_get_expr(d.adbin, d.adrelid) + from '''([^'']+)''' + )::regclass::oid else null::oid end as seqoid from pg_attrdef d