Commit 7f239c7
Tighten check for generated column in partition key expression
A generated column may end up being part of the partition key
expression, if it's specified as an expression e.g. "(<generated
column name>)" or if the partition key expression contains a whole-row
reference, even though we do not allow a generated column to be part
of partition key expression. Fix this hole.
Co-authored-by: jian he <jian.universality@gmail.com>
Co-authored-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxF%3DWDGthXSAQr9thYUsfx_1_t9E6N8tE3B8EqXcVoVfQw%40mail.gmail.com1 parent 3c7b479 commit 7f239c7
File tree
3 files changed
+66
-38
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+66
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16548 | 16548 | | |
16549 | 16549 | | |
16550 | 16550 | | |
| 16551 | + | |
| 16552 | + | |
16551 | 16553 | | |
16552 | 16554 | | |
16553 | 16555 | | |
| |||
16571 | 16573 | | |
16572 | 16574 | | |
16573 | 16575 | | |
| 16576 | + | |
| 16577 | + | |
| 16578 | + | |
| 16579 | + | |
| 16580 | + | |
| 16581 | + | |
| 16582 | + | |
| 16583 | + | |
| 16584 | + | |
| 16585 | + | |
| 16586 | + | |
| 16587 | + | |
| 16588 | + | |
| 16589 | + | |
| 16590 | + | |
| 16591 | + | |
| 16592 | + | |
| 16593 | + | |
| 16594 | + | |
| 16595 | + | |
| 16596 | + | |
| 16597 | + | |
| 16598 | + | |
| 16599 | + | |
| 16600 | + | |
| 16601 | + | |
| 16602 | + | |
| 16603 | + | |
| 16604 | + | |
| 16605 | + | |
| 16606 | + | |
| 16607 | + | |
| 16608 | + | |
| 16609 | + | |
| 16610 | + | |
| 16611 | + | |
| 16612 | + | |
| 16613 | + | |
| 16614 | + | |
| 16615 | + | |
| 16616 | + | |
| 16617 | + | |
| 16618 | + | |
| 16619 | + | |
| 16620 | + | |
16574 | 16621 | | |
16575 | 16622 | | |
16576 | 16623 | | |
| 16624 | + | |
16577 | 16625 | | |
16578 | 16626 | | |
16579 | 16627 | | |
| |||
16582 | 16630 | | |
16583 | 16631 | | |
16584 | 16632 | | |
16585 | | - | |
16586 | | - | |
16587 | | - | |
16588 | 16633 | | |
16589 | 16634 | | |
16590 | 16635 | | |
| |||
16594 | 16639 | | |
16595 | 16640 | | |
16596 | 16641 | | |
16597 | | - | |
16598 | | - | |
16599 | | - | |
16600 | | - | |
16601 | | - | |
16602 | | - | |
16603 | | - | |
16604 | | - | |
16605 | | - | |
16606 | | - | |
16607 | | - | |
16608 | | - | |
16609 | | - | |
16610 | | - | |
16611 | | - | |
16612 | | - | |
16613 | | - | |
16614 | | - | |
16615 | | - | |
16616 | | - | |
16617 | | - | |
16618 | | - | |
16619 | | - | |
16620 | | - | |
16621 | | - | |
16622 | | - | |
16623 | | - | |
16624 | | - | |
16625 | | - | |
16626 | | - | |
16627 | | - | |
16628 | | - | |
16629 | | - | |
16630 | | - | |
16631 | | - | |
16632 | 16642 | | |
16633 | 16643 | | |
16634 | 16644 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
696 | 701 | | |
697 | 702 | | |
698 | 703 | | |
699 | 704 | | |
700 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
701 | 716 | | |
702 | 717 | | |
703 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
373 | 374 | | |
| 375 | + | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| |||
0 commit comments