period mods
This commit is contained in:
parent
9e05d8261f
commit
10223cf72f
@ -34,7 +34,12 @@ COMMENT ON COLUMN evt.acct.prop IS 'properties';
|
||||
CREATE TABLE evt.fspr (
|
||||
id ltree
|
||||
,dur tstzrange
|
||||
);
|
||||
)
|
||||
|
||||
COMMENT ON COLUMN evt.fspr.id IS 'fiscal period';
|
||||
COMMENT ON COLUMN evt.fspr.dur IS 'duration of period as timestamp range';
|
||||
|
||||
CREATE INDEX id_gist ON evt.fspr USING GIST (id);
|
||||
|
||||
--------------------------relational ledger------------------------------------------
|
||||
|
||||
|
@ -36,6 +36,6 @@ SELECT
|
||||
)::ltree t2
|
||||
,tstzrange(gs.d,gs.d + '1 month'::interval) r
|
||||
FROM
|
||||
generate_series('2018-01-01 00:00'::timestamptz,'2099-12-01 00:00'::timestamptz,'1 month') gs(d)
|
||||
generate_series('2018-01-01 00:00'::timestamptz,'2099-12-01 00:00'::timestamptz,'1 day') gs(d)
|
||||
INNER JOIN m ON
|
||||
m.cm = extract(month from gs.d)
|
@ -3,3 +3,6 @@ CREATE TABLE evt.fspr (
|
||||
id ltree
|
||||
,dur tstzrange
|
||||
)
|
||||
|
||||
|
||||
CREATE INDEX id_gist ON evt.fspr USING GIST (id);
|
Loading…
Reference in New Issue
Block a user