Skip to content

Commit

Permalink
Force empty LOB to be exported as NULL when NO_LOB_LOCATOR is activat…
Browse files Browse the repository at this point in the history
…ed to have the same behavior.
  • Loading branch information
darold committed Mar 13, 2016
1 parent 8c6c840 commit 1e2b4f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Ora2Pg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10237,6 +10237,7 @@ sub _extract_data
my $has_blob = 0;
$has_blob = 1 if (grep(/LOB/, @$stt));
if (!$has_blob || $self->{no_lob_locator}) {

while ( my $rows = $sth->fetchall_arrayref(undef,$data_limit)) {

if ( ($self->{parallel_tables} > 1) || (($self->{oracle_copies} > 1) && $self->{defined_pk}{"\L$table\E"}) ) {
Expand Down Expand Up @@ -13990,6 +13991,7 @@ sub _escape_lob
my ($self, $col, $generic_type) = @_;

if ($self->{type} eq 'COPY') {
return '\N' if (!$col);
if ( ($generic_type eq 'BLOB') || ($generic_type eq 'RAW') ) {
#$col = escape_bytea($col);
# RAW data type is returned in hex
Expand All @@ -14012,6 +14014,7 @@ sub _escape_lob
}
}
} else {
return 'NULL' if (!$col);
if ( ($generic_type eq 'BLOB') || ($generic_type eq 'RAW') ) {
#$col = escape_bytea($col);
# RAW data type is returned in hex
Expand Down

0 comments on commit 1e2b4f5

Please sign in to comment.