- Notifications
You must be signed in to change notification settings - Fork5
Commiteabc714
committed
Reimplement parsing and storage of default expressions and constraint
expressions in CREATE TABLE. There is no longer an emasculated expressionsyntax for these things; it's full a_expr for constraints, and b_exprfor defaults (unfortunately the fact that NOT NULL is a part of thecolumn constraint syntax causes a shift/reduce conflict if you try a_expr.Oh well --- at least parenthesized boolean expressions work now). Also,stored expression for a column default is not pre-coerced to the columntype; we rely on transformInsertStatement to do that when the default isactually used. This means "f1 datetime default 'now'" behaves the waypeople usually expect it to.BTW, all the support code is now there to implement ALTER TABLE ADDCONSTRAINT and ALTER TABLE ADD COLUMN with a default value. I didn'tactually teach ALTER TABLE to call it, but it wouldn't be much work.1 parentf29ccc8 commiteabc714
File tree
18 files changed
+923
-886
lines changed- src
- backend
- access/common
- catalog
- commands
- nodes
- parser
- utils
- adt
- cache
- include
- access
- catalog
- nodes
- utils
- test/regress
- input
- output
18 files changed
+923
-886
lines changedLines changed: 12 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
164 |
| - | |
165 | 163 |
| |
166 | 164 |
| |
167 | 165 |
| |
| |||
175 | 173 |
| |
176 | 174 |
| |
177 | 175 |
| |
178 |
| - | |
179 |
| - | |
180 | 176 |
| |
181 | 177 |
| |
182 | 178 |
| |
| |||
206 | 202 |
| |
207 | 203 |
| |
208 | 204 |
| |
209 |
| - | |
210 |
| - | |
211 | 205 |
| |
212 | 206 |
| |
213 | 207 |
| |
| |||
221 | 215 |
| |
222 | 216 |
| |
223 | 217 |
| |
224 |
| - | |
225 |
| - | |
226 | 218 |
| |
227 | 219 |
| |
228 | 220 |
| |
| |||
438 | 430 |
| |
439 | 431 |
| |
440 | 432 |
| |
441 |
| - | |
| 433 | + | |
442 | 434 |
| |
443 | 435 |
| |
444 | 436 |
| |
| |||
454 | 446 |
| |
455 | 447 |
| |
456 | 448 |
| |
457 |
| - | |
458 |
| - | |
459 | 449 |
| |
460 | 450 |
| |
461 |
| - | |
| 451 | + | |
462 | 452 |
| |
463 | 453 |
| |
464 | 454 |
| |
| |||
469 | 459 |
| |
470 | 460 |
| |
471 | 461 |
| |
472 |
| - | |
473 | 462 |
| |
474 | 463 |
| |
475 | 464 |
| |
| |||
513 | 502 |
| |
514 | 503 |
| |
515 | 504 |
| |
516 |
| - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
517 | 509 |
| |
518 | 510 |
| |
519 | 511 |
| |
520 | 512 |
| |
521 |
| - | |
522 |
| - | |
| 513 | + | |
523 | 514 |
| |
524 | 515 |
| |
525 | 516 |
| |
| |||
539 | 530 |
| |
540 | 531 |
| |
541 | 532 |
| |
| 533 | + | |
| 534 | + | |
542 | 535 |
| |
| 536 | + | |
| 537 | + | |
543 | 538 |
| |
544 | 539 |
| |
545 | 540 |
| |
|
0 commit comments
Comments
(0)