forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbd46cce
committed
Protect dblink from invalid options when using postgres_fdw server
When dblink uses a postgres_fdw server name for its connection, itis possible for the connection to have options that are invalidwith dblink (e.g. "updatable"). The recommended way to avoid thisproblem is to use dblink_fdw servers instead. However there are usecases for using postgres_fdw, and possibly other FDWs, for dblinkconnection options, therefore protect against trying to use anyoptions that do not apply by using is_valid_dblink_option() whenbuilding the connection string from the options.Back-patch to 9.3. Although 9.2 supports FDWs for connection info,is_valid_dblink_option() did not yet exist, and neither didpostgres_fdw, at least in the postgres source tree. Given the lackof previous complaints, fixing that seems too invasive/not worth it.Author: Corey HuinkerReviewed-By: Joe ConwayDiscussion:https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com1 parent1df8b3f commitbd46cce
1 file changed
+29
-6
lines changedLines changed: 29 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| 43 | + | |
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
| |||
2732 | 2733 |
| |
2733 | 2734 |
| |
2734 | 2735 |
| |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
2735 | 2755 |
| |
2736 | 2756 |
| |
2737 | 2757 |
| |
| |||
2755 | 2775 |
| |
2756 | 2776 |
| |
2757 | 2777 |
| |
2758 |
| - | |
2759 |
| - | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
2760 | 2781 |
| |
2761 | 2782 |
| |
2762 | 2783 |
| |
2763 | 2784 |
| |
2764 | 2785 |
| |
2765 | 2786 |
| |
2766 |
| - | |
2767 |
| - | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
2768 | 2790 |
| |
2769 | 2791 |
| |
2770 | 2792 |
| |
2771 | 2793 |
| |
2772 | 2794 |
| |
2773 | 2795 |
| |
2774 | 2796 |
| |
2775 |
| - | |
2776 |
| - | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
2777 | 2800 |
| |
2778 | 2801 |
| |
2779 | 2802 |
| |
|
0 commit comments
Comments
(0)