forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc5b8daa
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 parentcf9d992 commitc5b8daa
1 file changed
+24
-9
lines changedLines changed: 24 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
569 | 569 |
| |
570 | 570 |
| |
571 | 571 |
| |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
572 | 577 |
| |
573 | 578 |
| |
574 |
| - | |
575 |
| - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
576 | 582 |
| |
577 | 583 |
| |
578 | 584 |
| |
| |||
617 | 623 |
| |
618 | 624 |
| |
619 | 625 |
| |
620 |
| - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
621 | 631 |
| |
622 | 632 |
| |
623 |
| - | |
624 |
| - | |
| 633 | + | |
| 634 | + | |
625 | 635 |
| |
626 | 636 |
| |
627 | 637 |
| |
| |||
633 | 643 |
| |
634 | 644 |
| |
635 | 645 |
| |
636 |
| - | |
637 |
| - | |
638 |
| - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
639 | 649 |
| |
640 | 650 |
| |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
641 | 655 |
| |
642 | 656 |
| |
643 | 657 |
| |
| |||
655 | 669 |
| |
656 | 670 |
| |
657 | 671 |
| |
658 |
| - | |
| 672 | + | |
| 673 | + | |
659 | 674 |
| |
660 | 675 |
| |
661 | 676 |
| |
|
0 commit comments
Comments
(0)