PostgreSQL - Table Partitioning
Given the following partitioned table and partitions:
What will be the result of this query?
CREATE TABLE sales (id INT, sale_date DATE) PARTITION BY RANGE (sale_date);
CREATE TABLE sales_2023 PARTITION OF sales FOR VALUES FROM ('2023-01-01') TO ('2024-01-01');
CREATE TABLE sales_2024 PARTITION OF sales FOR VALUES FROM ('2024-01-01') TO ('2025-01-01');What will be the result of this query?
SELECT tableoid::regclass, * FROM sales WHERE sale_date = '2023-06-15';
