TRUE, FALSE, FALSE
);
+INSERT INTO config.metabib_field (id, field_class, name,
+ label, xpath, display_field, search_field, browse_field)
+VALUES (
+ 44, 'identifier', 'pubdate',
+ oils_i18n_gettext(44, 'Publication Date', 'cmf', 'label'),
+ $$//mods33:mods/mods33:originInfo//mods33:dateIssued[@encoding="marc"]|//mods33:mods/mods33:originInfo//mods33:dateIssued[1]$$,
+ TRUE, FALSE, FALSE
+);
+
+
-- Modify existing config.metabib_field entries
UPDATE config.metabib_field SET display_field = TRUE WHERE id IN (
('publisher', 40, FALSE),
('abstract', 41, FALSE),
('toc', 42, FALSE),
- ('type_of_resource', 43, FALSE)
+ ('type_of_resource', 43, FALSE),
+ ('pubdate', 44, FALSE)
;
-- Add a column to wide-display-entry per well-known field
COALESCE(mcde_seriestitle.value, 'null') AS seriestitle,
COALESCE(mcde_abstract.value, 'null') AS abstract,
COALESCE(mcde_toc.value, 'null') AS toc,
+ COALESCE(mcde_pubdate.value, 'null') AS pubdate,
COALESCE(mcde_type_of_resource.value, 'null') AS type_of_resource
FROM biblio.record_entry bre
LEFT JOIN metabib.compressed_display_entry mcde_title
ON (bre.id = mcde_abstract.source AND mcde_abstract.name = 'abstract')
LEFT JOIN metabib.compressed_display_entry mcde_toc
ON (bre.id = mcde_toc.source AND mcde_toc.name = 'toc')
+ LEFT JOIN metabib.compressed_display_entry mcde_pubdate
+ ON (bre.id = mcde_pubdate.source AND mcde_pubdate.name = 'pubdate')
LEFT JOIN metabib.compressed_display_entry mcde_type_of_resource
ON (bre.id = mcde_type_of_resource.source
AND mcde_type_of_resource.name = 'type_of_resource')
/** ROLLBACK
BEGIN;
-DELETE FROM metabib.display_entry WHERE field IN (1,11,12,13,14,19,20,26,38,39,40,41,42,43);
-DELETE FROM config.display_field_map WHERE field IN (1,11,12,13,14,19,20,26,38,39,40,41,42,43);
-DELETE FROM config.metabib_field WHERE id IN (38,39,40,41,42,43);
+DELETE FROM metabib.display_entry WHERE field IN (1,11,12,13,14,19,20,26,38,39,40,41,42,43,44);
+DELETE FROM config.display_field_map WHERE field IN (1,11,12,13,14,19,20,26,38,39,40,41,42,43,44);
+DELETE FROM config.metabib_field WHERE id IN (38,39,40,41,42,43,44);
COMMIT;
*/