my $dbms_ver = eval { local $@; $self->_get_dbh->get_info(18) };
- $info{dbms_ver} = $dbms_ver if defined $dbms_ver;
+ if (defined $dbms_ver) {
+ $info{dbms_ver} = $dbms_ver;
+
+ my @verparts = split /\./, $dbms_ver;
+ $info{dbms_ver_normalized} = sprintf "%d.%03d%03d", @verparts;
+ }
$self->__server_info(\%info);
sub can_insert_returning {
my $self = shift;
- my ($major, $minor) = $self->_server_info->{dbms_ver} =~ /^(\d+)\.(\d+)/;
-
return 1
- if ($major > 8) || ($major == 8 && $minor >= 2);
+ if $self->_server_info->{dbms_ver_normalized} >= 8.002;
return 0;
}