diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-09 20:45:52 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-09 20:45:59 -0500 |
commit | 15bb93e28e49fdf4f28d509c07d1527886acb3e2 (patch) | |
tree | 77de68105536e56e8d3fbfab5e5416e5006c680b /src/backend | |
parent | 395bfaae8e786eb17fc9dd79e4636f97c9d9b820 (diff) | |
download | postgresql-15bb93e28e49fdf4f28d509c07d1527886acb3e2.tar.gz postgresql-15bb93e28e49fdf4f28d509c07d1527886acb3e2.zip |
Fix portability problem in Catalog.pm.
Commit 7666e73a2 introduced a dependency on filehandles' input_line_number
method, but apparently that's a Perl neologism. Use $. instead, which
works at least back to Perl 5.10, and hopefully back to 5.8.
Jeff Janes
Discussion: https://postgr.es/m/CAMkU=1wuQW=xVfu-14A4VCvxO0ohkD3m9vk6HOj_dprQoKNAQw@mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/Catalog.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm index 767a2ecc00a..bccbc5118db 100644 --- a/src/backend/catalog/Catalog.pm +++ b/src/backend/catalog/Catalog.pm @@ -66,6 +66,9 @@ sub Catalogs redo; } + # Remember input line number for later. + my $input_line_number = $.; + # Strip useless whitespace and trailing semicolons. chomp; s/^\s+//; @@ -80,7 +83,7 @@ sub Catalogs elsif (/^DATA\(insert(\s+OID\s+=\s+(\d+))?\s+\(\s*(.*)\s*\)\s*\)$/) { check_natts($filename, $catalog{natts}, $3, - $input_file, INPUT_FILE->input_line_number); + $input_file, $input_line_number); push @{ $catalog{data} }, { oid => $2, bki_values => $3 }; } @@ -242,4 +245,5 @@ sub check_natts $file, $line, $natts, scalar @atts unless $natts == @atts; } + 1; |