Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions check_postgres.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8666,6 +8666,7 @@ sub check_sequence {
if($skipcycled) {
$percsql = 'CASE WHEN cycle THEN 0 ELSE ' . $percsql . ' END';
}
my $version = verify_version();

my ($warning, $critical) = validate_range
({
Expand Down Expand Up @@ -8748,7 +8749,7 @@ sub check_sequence {
my $multidb = @{$info->{db}} > 1 ? "$db->{dbname}." : '';
my @seq_sql;
for my $r (@{$db->{slurp}}) { # for each sequence, create SQL command to inspect it
next if ($db->{version} >= 10); # TODO: skip loop entirely
next if ($version >= 10); # TODO: skip loop entirely
my ($schema, $seq, $seqname, $typename) = @$r{qw/ nspname seqname safename typname /};
next if skip_item($seq);
my $maxValue = $typename eq 'int2' ? $MAXINT2 : $typename eq 'int4' ? $MAXINT4 : $MAXINT8;
Expand All @@ -8765,7 +8766,7 @@ sub check_sequence {
FROM $seqname) foo
};
}
if ($db->{version} >= 10) {
if ($version >= 10) {
@seq_sql = ($SQL10); # inject PG10 query here (TODO: pull this out of loops)
}
# Use UNION ALL to query multiple sequences at once, however if there are too many sequences this can exceed
Expand Down