forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit18ce3a4
committed
Add infrastructure to support EphemeralNamedRelation references.
A QueryEnvironment concept is added, which allows new types ofobjects to be passed into queries from parsing on throughexecution. At this point, the only thing implemented is acollection of EphemeralNamedRelation objects -- relations whichcan be referenced by name in queries, but do not exist in thecatalogs. The only type of ENR implemented is NamedTuplestore, butprovision is made to add more types fairly easily.An ENR can carry its own TupleDesc or reference a relation in thecatalogs by relid.Although these features can be used without SPI, conveniencefunctions are added to SPI so that ENRs can easily be used by coderun through SPI.The initial use of all this is going to be transition tables inAFTER triggers, but that will be added to each PL as a separatecommit.An incidental effect of this patch is to produce a more informativeerror message if an attempt is made to modify the contents of a CTEfrom a referencing DML statement. No tests previously covered thatpossibility, so one is added.Kevin Grittner and Thomas MunroReviewed by Heikki Linnakangas, David Fetter, and Thomas Munrowith valuable comments and suggestions from many others1 parent25dc142 commit18ce3a4
File tree
78 files changed
+1598
-122
lines changed- contrib/pg_stat_statements
- doc/src/sgml
- src
- backend
- catalog
- commands
- executor
- nodes
- optimizer
- path
- plan
- prep
- util
- parser
- tcop
- utils
- adt
- cache
- misc
- sort
- include
- catalog
- commands
- executor
- nodes
- optimizer
- parser
- tcop
- utils
- test/regress
- expected
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
78 files changed
+1598
-122
lines changedLines changed: 10 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
| 302 | + | |
302 | 303 |
| |
303 | 304 |
| |
304 | 305 |
| |
| |||
956 | 957 |
| |
957 | 958 |
| |
958 | 959 |
| |
959 |
| - | |
| 960 | + | |
| 961 | + | |
960 | 962 |
| |
961 | 963 |
| |
962 | 964 |
| |
| |||
994 | 996 |
| |
995 | 997 |
| |
996 | 998 |
| |
997 |
| - | |
| 999 | + | |
998 | 1000 |
| |
999 | 1001 |
| |
1000 | 1002 |
| |
1001 |
| - | |
| 1003 | + | |
1002 | 1004 |
| |
1003 | 1005 |
| |
1004 | 1006 |
| |
| |||
1058 | 1060 |
| |
1059 | 1061 |
| |
1060 | 1062 |
| |
1061 |
| - | |
| 1063 | + | |
1062 | 1064 |
| |
1063 | 1065 |
| |
1064 | 1066 |
| |
1065 |
| - | |
| 1067 | + | |
1066 | 1068 |
| |
1067 | 1069 |
| |
1068 | 1070 |
| |
| |||
2424 | 2426 |
| |
2425 | 2427 |
| |
2426 | 2428 |
| |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
2427 | 2432 |
| |
2428 | 2433 |
| |
2429 | 2434 |
| |
|
Lines changed: 204 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2639 | 2639 |
| |
2640 | 2640 |
| |
2641 | 2641 |
| |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
2642 | 2846 |
| |
2643 | 2847 |
| |
2644 | 2848 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
934 | 934 |
| |
935 | 935 |
| |
936 | 936 |
| |
937 |
| - | |
| 937 | + | |
| 938 | + | |
938 | 939 |
| |
939 | 940 |
| |
940 | 941 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1471 | 1471 |
| |
1472 | 1472 |
| |
1473 | 1473 |
| |
1474 |
| - | |
| 1474 | + | |
| 1475 | + | |
1475 | 1476 |
| |
1476 | 1477 |
| |
1477 | 1478 |
| |
| |||
1574 | 1575 |
| |
1575 | 1576 |
| |
1576 | 1577 |
| |
1577 |
| - | |
| 1578 | + | |
1578 | 1579 |
| |
1579 | 1580 |
| |
1580 | 1581 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
| 225 | + | |
| 226 | + | |
226 | 227 |
| |
227 | 228 |
| |
228 | 229 |
| |
| |||
341 | 342 |
| |
342 | 343 |
| |
343 | 344 |
| |
344 |
| - | |
| 345 | + | |
345 | 346 |
| |
346 | 347 |
| |
347 | 348 |
| |
|
0 commit comments
Comments
(0)