Refrain from using regexp_match() function, introduced in Pg10.

Instead use the substring() function which has been there all along.

See #813.
This commit is contained in:
Dimitri Fontaine 2018-08-22 10:52:01 +02:00
parent c9b905b7ac
commit 4fbfd9e522

View File

@ -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