- Notifications
You must be signed in to change notification settings - Fork28
Commite4128ee
committed
SQL procedures
This adds a new object type "procedure" that is similar to a functionbut does not have a return type and is invoked by the new CALL statementinstead of SELECT or similar. This implementation is aligned with theSQL standard and compatible with or similar to other SQL implementations.This commit adds new commands CALL, CREATE/ALTER/DROP PROCEDURE, as wellas ALTER/DROP ROUTINE that can refer to either a function or aprocedure (or an aggregate function, as an extension to SQL). There isalso support for procedures in various utility commands such as COMMENTand GRANT, as well as support in pg_dump and psql. Support for definingprocedures is available in all the languages supplied by the coredistribution.While this commit is mainly syntax sugar around existing functionality,future features will rely on having procedures as a separate objecttype.Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>1 parent1761653 commite4128ee
File tree
92 files changed
+2951
-305
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- executor
- nodes
- optimizer/util
- parser
- tcop
- utils
- adt
- cache
- bin
- pg_dump
- t
- psql
- include
- catalog
- commands
- nodes
- parser
- utils
- interfaces/ecpg/preproc
- pl
- plperl
- expected
- sql
- plpgsql/src
- plpython
- expected
- sql
- tcl
- expected
- sql
- 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.
92 files changed
+2951
-305
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5241 | 5241 |
| |
5242 | 5242 |
| |
5243 | 5243 |
| |
5244 |
| - | |
| 5244 | + | |
5245 | 5245 |
| |
5246 | 5246 |
| |
5247 | 5247 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3947 | 3947 |
| |
3948 | 3948 |
| |
3949 | 3949 |
| |
3950 |
| - | |
| 3950 | + | |
3951 | 3951 |
| |
3952 | 3952 |
| |
3953 | 3953 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4778 | 4778 |
| |
4779 | 4779 |
| |
4780 | 4780 |
| |
4781 |
| - | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
4782 | 4784 |
| |
4783 | 4785 |
| |
4784 | 4786 |
| |
|
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3972 | 3972 |
| |
3973 | 3973 |
| |
3974 | 3974 |
| |
3975 |
| - | |
3976 |
| - | |
| 3975 | + | |
| 3976 | + | |
3977 | 3977 |
| |
3978 | 3978 |
| |
3979 | 3979 |
| |
| |||
4037 | 4037 |
| |
4038 | 4038 |
| |
4039 | 4039 |
| |
4040 |
| - | |
4041 |
| - | |
| 4040 | + | |
| 4041 | + | |
4042 | 4042 |
| |
4043 | 4043 |
| |
4044 | 4044 |
| |
| |||
4087 | 4087 |
| |
4088 | 4088 |
| |
4089 | 4089 |
| |
4090 |
| - | |
| 4090 | + | |
4091 | 4091 |
| |
4092 | 4092 |
| |
4093 | 4093 |
| |
| |||
4180 | 4180 |
| |
4181 | 4181 |
| |
4182 | 4182 |
| |
4183 |
| - | |
| 4183 | + | |
4184 | 4184 |
| |
4185 | 4185 |
| |
4186 | 4186 |
| |
| |||
4189 | 4189 |
| |
4190 | 4190 |
| |
4191 | 4191 |
| |
4192 |
| - | |
| 4192 | + | |
4193 | 4193 |
| |
4194 | 4194 |
| |
4195 | 4195 |
| |
4196 | 4196 |
| |
4197 | 4197 |
| |
4198 | 4198 |
| |
4199 | 4199 |
| |
4200 |
| - | |
| 4200 | + | |
4201 | 4201 |
| |
4202 | 4202 |
| |
4203 | 4203 |
| |
| |||
4314 | 4314 |
| |
4315 | 4315 |
| |
4316 | 4316 |
| |
4317 |
| - | |
| 4317 | + | |
4318 | 4318 |
| |
4319 | 4319 |
| |
4320 | 4320 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
70 | 74 |
| |
71 | 75 |
| |
72 | 76 |
| |
|
Lines changed: 15 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
159 |
| - | |
| 159 | + | |
| 160 | + | |
160 | 161 |
| |
161 | 162 |
| |
162 | 163 |
| |
| |||
1865 | 1866 |
| |
1866 | 1867 |
| |
1867 | 1868 |
| |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
1868 | 1881 |
| |
1869 | 1882 |
| |
1870 | 1883 |
| |
| |||
5244 | 5257 |
| |
5245 | 5258 |
| |
5246 | 5259 |
| |
5247 |
| - | |
| 5260 | + | |
5248 | 5261 |
| |
5249 | 5262 |
| |
5250 | 5263 |
| |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
207 | 207 |
| |
208 | 208 |
| |
209 | 209 |
| |
210 |
| - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
211 | 215 |
| |
212 | 216 |
| |
213 | 217 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
| 101 | + | |
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
29 | 30 |
| |
30 | 31 |
| |
| 32 | + | |
31 | 33 |
| |
32 | 34 |
| |
33 | 35 |
| |
| |||
48 | 50 |
| |
49 | 51 |
| |
50 | 52 |
| |
| 53 | + | |
51 | 54 |
| |
52 | 55 |
| |
53 | 56 |
| |
| |||
75 | 78 |
| |
76 | 79 |
| |
77 | 80 |
| |
| 81 | + | |
78 | 82 |
| |
79 | 83 |
| |
80 | 84 |
| |
| |||
122 | 126 |
| |
123 | 127 |
| |
124 | 128 |
| |
| 129 | + | |
125 | 130 |
| |
126 | 131 |
| |
| 132 | + | |
127 | 133 |
| |
128 | 134 |
| |
129 | 135 |
| |
|
Lines changed: 9 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 |
| - | |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
96 |
| - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
97 | 103 |
| |
98 | 104 |
| |
99 | 105 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| 48 | + | |
| 49 | + | |
48 | 50 |
| |
49 | 51 |
| |
50 | 52 |
| |
| |||
170 | 172 |
| |
171 | 173 |
| |
172 | 174 |
| |
| 175 | + | |
| 176 | + | |
173 | 177 |
| |
174 | 178 |
| |
175 | 179 |
| |
176 | 180 |
| |
177 | 181 |
| |
178 |
| - | |
| 182 | + | |
179 | 183 |
| |
180 | 184 |
| |
181 | 185 |
| |
| |||
204 | 208 |
| |
205 | 209 |
| |
206 | 210 |
| |
207 |
| - | |
| 211 | + | |
208 | 212 |
| |
209 | 213 |
| |
210 | 214 |
| |
| |||
222 | 226 |
| |
223 | 227 |
| |
224 | 228 |
| |
225 |
| - | |
| 229 | + | |
226 | 230 |
| |
227 | 231 |
| |
228 | 232 |
| |
| |||
235 | 239 |
| |
236 | 240 |
| |
237 | 241 |
| |
238 |
| - | |
| 242 | + | |
239 | 243 |
| |
240 | 244 |
| |
241 | 245 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
359 | 359 |
| |
360 | 360 |
| |
361 | 361 |
| |
| 362 | + | |
| 363 | + | |
362 | 364 |
| |
363 | 365 |
| |
364 | 366 |
|
0 commit comments
Comments
(0)