Commit b49afa3
Implementation of tag.
We implement tag in this commit. Tag can be attached to target database
object, which maybe database, user, schema, table etc. Tag has allowed
values, when we attach one tag to target object, we should specify this
tag's value which must be in allowed values array, otherwise will error
out.
To use it, we will illustrate some example as following:
CREATE TAG tag_example allowed_values '123', 'abc';
CREATE USER tag_user;
ALTER USER tag_user TAG (tag_example = '123');
ALTER TAG tag_example ADD ALLOWED_VALUES 'def';
ALTER TAG tag_example DROP ALLOWED_VALUES 'abc';
Authored-by: Zhang Wenchao zwcpostgres@gmail.com1 parent 3c1f29a commit b49afa3
65 files changed
Lines changed: 7166 additions & 70 deletions
File tree
- src
- backend
- catalog
- commands
- nodes
- parser
- postmaster
- tcop
- utils/cache
- bin
- pg_dump
- psql
- include
- catalog
- commands
- nodes
- parser
- tcop
- utils
- test
- modules/test_ddl_deparse
- regress
- expected
- input
- output
- singlenode_regress
- expected
- input
- output
- tools/pgindent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
98 | 99 | | |
99 | | - | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
3791 | 3792 | | |
3792 | 3793 | | |
3793 | 3794 | | |
| 3795 | + | |
| 3796 | + | |
| 3797 | + | |
3794 | 3798 | | |
3795 | 3799 | | |
3796 | 3800 | | |
| |||
3902 | 3906 | | |
3903 | 3907 | | |
3904 | 3908 | | |
| 3909 | + | |
| 3910 | + | |
| 3911 | + | |
3905 | 3912 | | |
3906 | 3913 | | |
3907 | 3914 | | |
| |||
5647 | 5654 | | |
5648 | 5655 | | |
5649 | 5656 | | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
| 5661 | + | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
| 5666 | + | |
| 5667 | + | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| 5672 | + | |
| 5673 | + | |
| 5674 | + | |
| 5675 | + | |
| 5676 | + | |
| 5677 | + | |
| 5678 | + | |
| 5679 | + | |
| 5680 | + | |
| 5681 | + | |
| 5682 | + | |
| 5683 | + | |
5650 | 5684 | | |
5651 | 5685 | | |
5652 | 5686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
450 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
451 | 456 | | |
452 | 457 | | |
453 | 458 | | |
| |||
501 | 506 | | |
502 | 507 | | |
503 | 508 | | |
504 | | - | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
505 | 515 | | |
506 | 516 | | |
507 | 517 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
81 | 84 | | |
82 | 85 | | |
83 | 86 | | |
| |||
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
| 215 | + | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
1474 | 1479 | | |
1475 | 1480 | | |
1476 | 1481 | | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1477 | 1489 | | |
1478 | 1490 | | |
1479 | 1491 | | |
1480 | 1492 | | |
1481 | 1493 | | |
1482 | 1494 | | |
1483 | 1495 | | |
| 1496 | + | |
1484 | 1497 | | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1485 | 1507 | | |
1486 | 1508 | | |
1487 | 1509 | | |
| |||
1551 | 1573 | | |
1552 | 1574 | | |
1553 | 1575 | | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
1554 | 1582 | | |
1555 | 1583 | | |
1556 | 1584 | | |
| |||
1593 | 1621 | | |
1594 | 1622 | | |
1595 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
1596 | 1626 | | |
1597 | 1627 | | |
1598 | 1628 | | |
| |||
2996 | 3026 | | |
2997 | 3027 | | |
2998 | 3028 | | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
2999 | 3035 | | |
3000 | 3036 | | |
3001 | 3037 | | |
| |||
0 commit comments