時(shí)間:2024-02-14 10:20作者:下載吧人氣:17
PosgtreSQL 11 支持為分區(qū)表創(chuàng)建一個(gè)默認(rèn)(DEFAULT)的分區(qū),用于存儲(chǔ)無法匹配其他任何分區(qū)的數(shù)據(jù)。顯然,只有 RANGE 分區(qū)表和 LIST 分區(qū)表需要默認(rèn)分區(qū)。
CREATE TABLE measurement (
city_id int not null,
logdate date not null,
peaktemp int,
unitsales int
) PARTITION BY RANGE (logdate);
CREATE TABLE measurement_y2018 PARTITION OF measurement
FOR VALUES FROM (‘2018-01-01’) TO (‘2019-01-01’);
網(wǎng)友評(píng)論