postgresqlpartioning
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| postgresqlpartioning [2022/11/29 10:51] – z0hpvk | postgresqlpartioning [2025/03/08 22:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 43: | Line 43: | ||
| From Postgres 11 it is possible to create a default partition. \\ | From Postgres 11 it is possible to create a default partition. \\ | ||
| <code SQL> | <code SQL> | ||
| - | CREATE TABLE USERS_PART_2021 | + | CREATE TABLE USERS_PART_DF |
| </ | </ | ||
| - | ===== Select ===== | + | ===== Select |
| - | It is possible to show which partitioned table your select query has used. \\ | + | It is possible to show which partitioned table your select |
| <code SQL> | <code SQL> | ||
| SELECT tableoid, tableoid:: | SELECT tableoid, tableoid:: | ||
| WHERE user_role = ' | WHERE user_role = ' | ||
| </ | </ | ||
| + | |||
| + | <code SQL> | ||
| + | INSERT INTO users_part (username, user_role) | ||
| + | VALUES (' | ||
| + | RETURNING tableoid:: | ||
| + | </ | ||
| + | |||
| + | ===== Example ===== | ||
| + | [[PGPartitionExample| Partitioning Example]]\\ | ||
| + | |||
postgresqlpartioning.1669719119.txt.gz · Last modified: (external edit)
