forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit858e776
committed
Convert the reg* input functions to report (most) errors softly.
This is not really complete, but it catches most cases of practicalinterest. The main omissions are:* regtype, regprocedure, and regoperator parse type names bycalling the main grammar, so any grammar-detected syntax errorwill still be a hard error. Also, if one includes a typemodifier in such a type specification, errors detected by thetypmodin function will be hard errors.* Lookup errors are handled just by passing missing_ok = trueto the relevant catalog lookup function. Because we've usedquite a restrictive definition of "missing_ok", this means thatedge cases such as "the named schema exists, but you lackUSAGE permission on it" are still hard errors.It would make sense to me to replace most/all missing_okparameters with an escontext parameter and then allow theseadditional lookup failure cases to be trapped too. But that'sa job for some other day.Discussion:https://postgr.es/m/3342239.1671988406@sss.pgh.pa.us1 parent78212f2 commit858e776
File tree
16 files changed
+403
-128
lines changed- src
- backend
- catalog
- parser
- tsearch
- utils
- adt
- cache
- fmgr
- include
- parser
- utils
- pl
- plperl
- plpgsql/src
- plpython
- tcl
- test/regress
- expected
- sql
16 files changed
+403
-128
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2182 | 2182 | | |
2183 | 2183 | | |
2184 | 2184 | | |
2185 | | - | |
| 2185 | + | |
2186 | 2186 | | |
2187 | 2187 | | |
2188 | 2188 | | |
| |||
2238 | 2238 | | |
2239 | 2239 | | |
2240 | 2240 | | |
2241 | | - | |
| 2241 | + | |
| 2242 | + | |
2242 | 2243 | | |
2243 | 2244 | | |
2244 | 2245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
731 | 736 | | |
732 | 737 | | |
733 | | - | |
| 738 | + | |
734 | 739 | | |
735 | 740 | | |
736 | 741 | | |
| |||
763 | 768 | | |
764 | 769 | | |
765 | 770 | | |
766 | | - | |
| 771 | + | |
767 | 772 | | |
768 | 773 | | |
769 | | - | |
770 | 774 | | |
771 | 775 | | |
772 | 776 | | |
773 | 777 | | |
774 | 778 | | |
775 | 779 | | |
776 | | - | |
777 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
778 | 783 | | |
779 | | - | |
780 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
781 | 787 | | |
782 | 788 | | |
783 | 789 | | |
784 | 790 | | |
785 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
786 | 794 | | |
787 | | - | |
| 795 | + | |
| 796 | + | |
788 | 797 | | |
789 | 798 | | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
797 | 803 | | |
798 | 804 | | |
799 | 805 | | |
800 | 806 | | |
801 | 807 | | |
802 | 808 | | |
803 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
804 | 812 | | |
805 | 813 | | |
806 | | - | |
807 | | - | |
| 814 | + | |
| 815 | + | |
808 | 816 | | |
809 | 817 | | |
810 | 818 | | |
| 819 | + | |
| 820 | + | |
811 | 821 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| 602 | + | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
| |||
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
645 | | - | |
| 646 | + | |
| 647 | + | |
646 | 648 | | |
647 | 649 | | |
648 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
| |||
0 commit comments
Comments
(0)