Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \d dataset_search
- Table "sde.dataset_search"
- Column | Type | Modifiers
- -------------------------+-----------+-------------------------------------------------------------
- id | integer | not null default nextval('dataset_search_id_seq'::regclass)
- column_id | integer |
- dataset_id | integer |
- set_id | integer |
- type | integer |
- name | text |
- display_name | text |
- short_label | text |
- full_label | text |
- taxonomy_terms | text |
- description | text |
- data_source_description | text |
- link | text |
- all_words | text |
- search | tsvector |
- product_ids | integer[] |
- group_ids | integer[] |
- Indexes:
- "dataset_search_pkey" PRIMARY KEY, btree (id)
- "dataset_search_column_id_index" btree (column_id)
- "dataset_search_dataset_id_index" btree (dataset_id)
- "dataset_search_group_ids_index" gist (group_ids gist__intbig_ops)
- "dataset_search_product_ids_index" gist (product_ids gist__intbig_ops)
- "dataset_search_search_index" gin (search)
- "dataset_search_set_id_index" btree (set_id)
- "dataset_search_type_index" btree (type)
- Foreign-key constraints:
- "dataset_search_column_id_fk" FOREIGN KEY (column_id) REFERENCES dataset_column(column_id) ON DELETE CASCADE
- "dataset_search_dataset_id_fk" FOREIGN KEY (dataset_id) REFERENCES dataset(dataset_id) ON DELETE CASCADE
- "dataset_search_set_id_fk" FOREIGN KEY (set_id) REFERENCES user_site_set(id) ON DELETE CASCADE
- A function inserts into that table:
- insert into dataset_search (column_id, type, full_label, description, data_source_description, name, display_name, short_label, link, taxonomy_terms, product_ids, group_ids, all_words, search) values
- (_id, _type, full_label, description, data_source_description, name, display_name, short_label, link, taxonomy_terms, product_ids, group_ids,
- weightA || ' ' || weightB || ' ' || weightC || ' ' || weightD,
- setweight (to_tsvector (weightA), 'A') || setweight (to_tsvector (weightB), 'B') || setweight (to_tsvector (weightC), 'C') || setweight (to_tsvector (weightD), 'D'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement