Skip to content

Commit

Permalink
Fix another procedure parsing with return. Thanks to Eric Bourlon for…
Browse files Browse the repository at this point in the history
… the report.
  • Loading branch information
gilles-migops committed Dec 9, 2021
1 parent 7d923e4 commit 487ce2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Ora2Pg/Oracle.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1567,11 +1567,11 @@ sub _lookup_function
$fct_detail{immutable} = 1 if ($fct_detail{declare} =~ s/\bDETERMINISTIC\b//is);
$fct_detail{setof} = 1 if ($fct_detail{declare} =~ s/\bPIPELINED\b//is);
$fct_detail{declare} =~ s/\bDEFAULT/:=/igs;
if ($fct_detail{declare} =~ s/(.*?)RETURN\s+self\s+AS RESULT IS//is) {
if ($fct_detail{declare} =~ s/(.*?)\bRETURN\s+self\s+AS RESULT IS//is) {
$fct_detail{args} .= $1;
$fct_detail{hasreturn} = 1;
$fct_detail{func_ret_type} = 'OPAQUE';
} elsif ($fct_detail{declare} =~ s/(.*?)RETURN\s+([^\s]+)//is) {
} elsif ($fct_detail{declare} =~ s/(.*?)\bRETURN\s+([^\s]+)//is) {
$fct_detail{args} .= $1;
$fct_detail{hasreturn} = 1;
$fct_detail{func_ret_type} = $self->_sql_type($2) || 'OPAQUE';
Expand Down

0 comments on commit 487ce2f

Please sign in to comment.