add table responses; + (work in progress) JSON table
This commit is contained in:
parent
abf870d291
commit
843c080901
2 changed files with 19 additions and 1 deletions
|
|
@ -12,8 +12,20 @@ CREATE TABLE messages (
|
|||
tstamp timestamptz default current_timestamp
|
||||
);
|
||||
|
||||
CREATE TABLE responses (
|
||||
id bigserial NOT NULL primary key,
|
||||
domain text,
|
||||
action text,
|
||||
class text,
|
||||
item text,
|
||||
payload jsonb,
|
||||
tstamp timestamptz default current_timestamp
|
||||
);
|
||||
|
||||
-- indexes
|
||||
|
||||
CREATE INDEX idx_msg ON messages USING btree (domain, action, class, item);
|
||||
CREATE INDEX idx_msg_item ON messages USING btree (domain, class, item);
|
||||
CREATE INDEX idx_msg_action ON messages USING btree (action);
|
||||
--CREATE INDEX idx_msg_action ON messages USING btree (action); -- obsolete
|
||||
|
||||
CREATE INDEX idx_resp_item ON responses USING btree (domain, class, item);
|
||||
|
|
|
|||
6
pgsql/msgstore/ttmp-json.sql
Normal file
6
pgsql/msgstore/ttmp-json.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
-- temporary table for loading JSON data
|
||||
|
||||
CREATE TABLE tmp_json (
|
||||
id bigserial NOT NULL primary key,
|
||||
data jsonb
|
||||
);
|
||||
Loading…
Add table
Reference in a new issue