The dump now (postgresql 11) contains lots of "public." which made
these regexps not match.
Signed-off-by: Ian Jackson <iwj@xenproject.org>
# What tables are there ?
perl -ne <$t.schema >$t.tablevars '
- if (m/^CREATE SEQUENCE (\w+)/) {
+ BEGIN { $sch_re = qr{(?:public\.)?}; }
+ if (m/^CREATE SEQUENCE $sch_re(\w+)/) {
print "sequences+=\" $1\"\n";
- } elsif (m/^CREATE TABLE (\w+)/) {
+ } elsif (m/^CREATE TABLE $sch_re(\w+)\s+/) {
$table=$1;
} elsif (m/^\s*flight\s+integer\s/) {
die unless $table;