forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit875406a
committed
Fix lo_import and lo_export to return useful error messages more often.
I found that these functions tend to return -1 while leaving an empty errormessage string in the PGconn, if they suffer some kind of I/O error on thefile. The reason is that lo_close, which thinks it's executed a perfectlyfine SQL command, clears the errorMessage. The minimum-change workaroundis to reorder operations here so that we don't fill the errorMessage untilafter lo_close.1 parent1e9d798 commit875406a
1 file changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
574 | 579 | | |
575 | 580 | | |
576 | | - | |
577 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
578 | 584 | | |
579 | 585 | | |
580 | 586 | | |
| |||
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
622 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
623 | 633 | | |
624 | 634 | | |
625 | | - | |
626 | | - | |
| 635 | + | |
| 636 | + | |
627 | 637 | | |
628 | 638 | | |
629 | 639 | | |
| |||
635 | 645 | | |
636 | 646 | | |
637 | 647 | | |
638 | | - | |
639 | | - | |
640 | | - | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
641 | 651 | | |
642 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
643 | 657 | | |
644 | 658 | | |
645 | 659 | | |
| |||
657 | 671 | | |
658 | 672 | | |
659 | 673 | | |
660 | | - | |
| 674 | + | |
| 675 | + | |
661 | 676 | | |
662 | 677 | | |
663 | 678 | | |
| |||
0 commit comments
Comments
(0)