|
12 | 12 | *
|
13 | 13 | *
|
14 | 14 | * IDENTIFICATION
|
15 |
| - * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.35 2003/02/09 00:30:39 tgl Exp $ |
| 15 | + * $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.36 2003/05/05 17:57:47 tgl Exp $ |
16 | 16 | *
|
17 | 17 | *-------------------------------------------------------------------------
|
18 | 18 | */
|
|
22 | 22 | * ExecInitNode - initialize a plan node and its subplans
|
23 | 23 | * ExecProcNode - get a tuple by executing the plan node
|
24 | 24 | * ExecEndNode - shut down a plan node and its subplans
|
25 |
| - * ExecGetTupType - get result tuple type of a plan node |
26 | 25 | *
|
27 | 26 | * NOTES
|
28 | 27 | * This used to be three files. It is now all combined into
|
@@ -602,181 +601,3 @@ ExecEndNode(PlanState *node)
|
602 | 601 | break;
|
603 | 602 | }
|
604 | 603 | }
|
605 |
| - |
606 |
| - |
607 |
| -/* ---------------------------------------------------------------- |
608 |
| - * ExecGetTupType |
609 |
| - * |
610 |
| - * this gives you the tuple descriptor for tuples returned |
611 |
| - * by this node. I really wish I could ditch this routine, |
612 |
| - * but since not all nodes store their type info in the same |
613 |
| - * place, we have to do something special for each node type. |
614 |
| - * |
615 |
| - * ---------------------------------------------------------------- |
616 |
| - */ |
617 |
| -TupleDesc |
618 |
| -ExecGetTupType(PlanState *node) |
619 |
| -{ |
620 |
| - TupleTableSlot *slot; |
621 |
| - |
622 |
| - if (node == NULL) |
623 |
| - return NULL; |
624 |
| - |
625 |
| - switch (nodeTag(node)) |
626 |
| - { |
627 |
| - case T_ResultState: |
628 |
| - { |
629 |
| - ResultState *resstate = (ResultState *) node; |
630 |
| - |
631 |
| - slot = resstate->ps.ps_ResultTupleSlot; |
632 |
| - } |
633 |
| - break; |
634 |
| - |
635 |
| - case T_AppendState: |
636 |
| - { |
637 |
| - AppendState *appendstate = (AppendState *) node; |
638 |
| - |
639 |
| - slot = appendstate->ps.ps_ResultTupleSlot; |
640 |
| - } |
641 |
| - break; |
642 |
| - |
643 |
| - case T_SeqScanState: |
644 |
| - { |
645 |
| - SeqScanState *scanstate = (SeqScanState *) node; |
646 |
| - |
647 |
| - slot = scanstate->ps.ps_ResultTupleSlot; |
648 |
| - } |
649 |
| - break; |
650 |
| - |
651 |
| - case T_IndexScanState: |
652 |
| - { |
653 |
| - IndexScanState *scanstate = (IndexScanState *) node; |
654 |
| - |
655 |
| - slot = scanstate->ss.ps.ps_ResultTupleSlot; |
656 |
| - } |
657 |
| - break; |
658 |
| - |
659 |
| - case T_TidScanState: |
660 |
| - { |
661 |
| - TidScanState *scanstate = (TidScanState *) node; |
662 |
| - |
663 |
| - slot = scanstate->ss.ps.ps_ResultTupleSlot; |
664 |
| - } |
665 |
| - break; |
666 |
| - |
667 |
| - case T_SubqueryScanState: |
668 |
| - { |
669 |
| - SubqueryScanState *scanstate = (SubqueryScanState *) node; |
670 |
| - |
671 |
| - slot = scanstate->ss.ps.ps_ResultTupleSlot; |
672 |
| - } |
673 |
| - break; |
674 |
| - |
675 |
| - case T_FunctionScanState: |
676 |
| - { |
677 |
| - FunctionScanState *scanstate = (FunctionScanState *) node; |
678 |
| - |
679 |
| - slot = scanstate->ss.ps.ps_ResultTupleSlot; |
680 |
| - } |
681 |
| - break; |
682 |
| - |
683 |
| - case T_NestLoopState: |
684 |
| - { |
685 |
| - NestLoopState *nlstate = (NestLoopState *) node; |
686 |
| - |
687 |
| - slot = nlstate->js.ps.ps_ResultTupleSlot; |
688 |
| - } |
689 |
| - break; |
690 |
| - |
691 |
| - case T_MergeJoinState: |
692 |
| - { |
693 |
| - MergeJoinState *mergestate = (MergeJoinState *) node; |
694 |
| - |
695 |
| - slot = mergestate->js.ps.ps_ResultTupleSlot; |
696 |
| - } |
697 |
| - break; |
698 |
| - |
699 |
| - case T_HashJoinState: |
700 |
| - { |
701 |
| - HashJoinState *hashjoinstate = (HashJoinState *) node; |
702 |
| - |
703 |
| - slot = hashjoinstate->js.ps.ps_ResultTupleSlot; |
704 |
| - } |
705 |
| - break; |
706 |
| - |
707 |
| - case T_MaterialState: |
708 |
| - { |
709 |
| - MaterialState *matstate = (MaterialState *) node; |
710 |
| - |
711 |
| - slot = matstate->ss.ss_ScanTupleSlot; |
712 |
| - } |
713 |
| - break; |
714 |
| - |
715 |
| - case T_SortState: |
716 |
| - { |
717 |
| - SortState *sortstate = (SortState *) node; |
718 |
| - |
719 |
| - slot = sortstate->ss.ss_ScanTupleSlot; |
720 |
| - } |
721 |
| - break; |
722 |
| - |
723 |
| - case T_GroupState: |
724 |
| - { |
725 |
| - GroupState *grpstate = (GroupState *) node; |
726 |
| - |
727 |
| - slot = grpstate->ss.ps.ps_ResultTupleSlot; |
728 |
| - } |
729 |
| - break; |
730 |
| - |
731 |
| - case T_AggState: |
732 |
| - { |
733 |
| - AggState *aggstate = (AggState *) node; |
734 |
| - |
735 |
| - slot = aggstate->ss.ps.ps_ResultTupleSlot; |
736 |
| - } |
737 |
| - break; |
738 |
| - |
739 |
| - case T_UniqueState: |
740 |
| - { |
741 |
| - UniqueState *uniquestate = (UniqueState *) node; |
742 |
| - |
743 |
| - slot = uniquestate->ps.ps_ResultTupleSlot; |
744 |
| - } |
745 |
| - break; |
746 |
| - |
747 |
| - case T_HashState: |
748 |
| - { |
749 |
| - HashState *hashstate = (HashState *) node; |
750 |
| - |
751 |
| - slot = hashstate->ps.ps_ResultTupleSlot; |
752 |
| - } |
753 |
| - break; |
754 |
| - |
755 |
| - case T_SetOpState: |
756 |
| - { |
757 |
| - SetOpState *setopstate = (SetOpState *) node; |
758 |
| - |
759 |
| - slot = setopstate->ps.ps_ResultTupleSlot; |
760 |
| - } |
761 |
| - break; |
762 |
| - |
763 |
| - case T_LimitState: |
764 |
| - { |
765 |
| - LimitState *limitstate = (LimitState *) node; |
766 |
| - |
767 |
| - slot = limitstate->ps.ps_ResultTupleSlot; |
768 |
| - } |
769 |
| - break; |
770 |
| - |
771 |
| - default: |
772 |
| - |
773 |
| - /* |
774 |
| - * should never get here |
775 |
| - */ |
776 |
| - elog(ERROR, "ExecGetTupType: node type %d unsupported", |
777 |
| - (int) nodeTag(node)); |
778 |
| - return NULL; |
779 |
| - } |
780 |
| - |
781 |
| - return slot->ttc_tupleDescriptor; |
782 |
| -} |
0 commit comments