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 42: | Line 42: | ||
From Postgres 11 it is possible to create a default partition. \\ | From Postgres 11 it is possible to create a default partition. \\ | ||
- | < | + | < |
- | CREATE TABLE USERS_PART_2021 | + | CREATE TABLE USERS_PART_DF |
- | <\code> | + | </code> |
- | ===== 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 |
- | < | + | < |
SELECT tableoid, tableoid:: | SELECT tableoid, tableoid:: | ||
WHERE user_role = ' | WHERE user_role = ' | ||
- | <\code> | + | </code> |
+ | |||
+ | <code SQL> | ||
+ | INSERT INTO users_part (username, user_role) | ||
+ | VALUES (' | ||
+ | RETURNING tableoid:: | ||
+ | </ | ||
+ | |||
+ | ===== Example ===== | ||
+ | [[PGPartitionExample| Partitioning Example]]\\ | ||
postgresqlpartioning.1669719075.txt.gz · Last modified: 2025/03/08 22:23 (external edit)