- Notifications
You must be signed in to change notification settings - Fork28
Commitc444868
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 parent01ec256 commitc444868
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 |
| |
| |||
2727 | 2728 |
| |
2728 | 2729 |
| |
2729 | 2730 |
| |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
2730 | 2750 |
| |
2731 | 2751 |
| |
2732 | 2752 |
| |
| |||
2750 | 2770 |
| |
2751 | 2771 |
| |
2752 | 2772 |
| |
2753 |
| - | |
2754 |
| - | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
2755 | 2776 |
| |
2756 | 2777 |
| |
2757 | 2778 |
| |
2758 | 2779 |
| |
2759 | 2780 |
| |
2760 | 2781 |
| |
2761 |
| - | |
2762 |
| - | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
2763 | 2785 |
| |
2764 | 2786 |
| |
2765 | 2787 |
| |
2766 | 2788 |
| |
2767 | 2789 |
| |
2768 | 2790 |
| |
2769 | 2791 |
| |
2770 |
| - | |
2771 |
| - | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
2772 | 2795 |
| |
2773 | 2796 |
| |
2774 | 2797 |
| |
|
0 commit comments
Comments
(0)