[open-ils-commits] r698 - in evergreen-ils.org/documentation: . schemas (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Oct 12 11:10:29 EDT 2009


Author: phasefx
Date: 2009-10-12 11:10:26 -0400 (Mon, 12 Oct 2009)
New Revision: 698

Added:
   evergreen-ils.org/documentation/schemas/
   evergreen-ils.org/documentation/schemas/evergreen-schema-1.6.0.0.html
Log:
database schema autodoc for 1.6.0.0

Added: evergreen-ils.org/documentation/schemas/evergreen-schema-1.6.0.0.html
===================================================================
--- evergreen-ils.org/documentation/schemas/evergreen-schema-1.6.0.0.html	                        (rev 0)
+++ evergreen-ils.org/documentation/schemas/evergreen-schema-1.6.0.0.html	2009-10-12 15:10:26 UTC (rev 698)
@@ -0,0 +1,62986 @@
+<!-- $Header: /cvsroot/autodoc/autodoc/html.tmpl,v 1.4 2006/05/16 19:01:27 rbt Exp $ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
+
+<html>
+  <head>
+    <title>Evergreen 1.6.0.0 Schema Documentation</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <style type="text/css">
+	BODY {
+		color:	#000000;
+		background-color: #FFFFFF;
+		font-family: Helvetica, sans-serif;
+	}
+
+	P {
+		margin-top: 5px;
+		margin-bottom: 5px;
+	}
+
+	P.w3ref {
+		font-size: 8pt;
+		font-style: italic;
+		text-align: right;
+	}
+
+	P.detail {
+		font-size: 10pt;
+	}
+
+	.error {
+		color: #FFFFFF;
+		background-color: #FF0000;
+	}
+
+	H1, H2, H3, H4, H5, H6 {
+	}
+
+	OL {
+		list-style-type: upper-alpha;
+	}
+
+	UL.topic {
+		list-style-type: upper-alpha;
+	}
+
+	LI.topic {
+		font-weight : bold;
+	}
+
+	HR {
+		color: #00FF00;
+		background-color: #808080;
+	}
+
+	TABLE {
+		border-width: medium;
+		padding: 3px;
+		background-color: #000000;
+		width: 90%;
+	}
+
+	CAPTION {
+		text-transform: capitalize;
+		font-weight : bold;
+		font-size: 14pt;
+	}
+
+	TH {
+		color: #FFFFFF;
+		background-color: #000000;
+		text-align: left;
+	}
+
+	TR {
+		color: #000000;
+		background-color: #000000;
+		vertical-align: top;
+	}
+
+	TR.tr0 {
+		background-color: #F0F0F0;
+	}
+
+	TR.tr1 {
+		background-color: #D8D8D8;
+	}
+
+	TD {
+		font-size: 12pt;
+	}
+
+	TD.col0 {
+		font-weight : bold;
+		width: 20%;
+	}
+
+	TD.col1 {
+		font-style: italic;
+		width: 15%;
+	}
+
+	TD.col2 {
+		font-size: 12px;
+	}
+    </style>
+    <link rel="stylesheet" type="text/css" media="all" href="all.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="screen.css">
+    <link rel="stylesheet" type="text/css" media="print" href="print.css">
+    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+  </head>
+  <body>
+
+    <!-- Primary Index -->
+	<p><br><br>Dumped on 2009-10-12</p>
+<h1><a name="index">Index of database - evergreen</a></h1>
+<ul>
+    
+    <li><a name="acq.schema">acq</a></li><ul>
+    	<li><a href="#acq.table.currency-type">currency_type</a></li><li><a href="#acq.table.distribution-formula">distribution_formula</a></li><li><a href="#acq.table.distribution-formula-entry">distribution_formula_entry</a></li><li><a href="#acq.table.exchange-rate">exchange_rate</a></li><li><a href="#acq.table.fund">fund</a></li><li><a href="#acq.table.fund-allocation">fund_allocation</a></li><li><a href="#acq.view.fund-allocation-total">fund_allocation_total</a></li><li><a href="#acq.view.fund-combined-balance">fund_combined_balance</a></li><li><a href="#acq.table.fund-debit">fund_debit</a></li><li><a href="#acq.view.fund-debit-total">fund_debit_total</a></li><li><a href="#acq.view.fund-encumbrance-total">fund_encumbrance_total</a></li><li><a href="#acq.view.fund-spent-balance">fund_spent_balance</a></li><li><a href="#acq.view.fund-spent-total">fund_spent_total</a></li><li><a href="#acq.table.fund-tag">fund_tag</a></li><li><a href="#acq.table.fund-tag-map">fund_tag_map</a></li><li><a href="#acq.table.funding-source">funding_source</a></li><li><a href="#acq.view.funding-source-allocation-total">funding_source_allocation_total</a></li><li><a href="#acq.view.funding-source-balance">funding_source_balance</a></li><li><a href="#acq.table.funding-source-credit">funding_source_credit</a></li><li><a href="#acq.view.funding-source-credit-total">funding_source_credit_total</a></li><li><a href="#acq.table.lineitem">lineitem</a></li><li><a href="#acq.table.lineitem-attr">lineitem_attr</a></li><li><a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a></li><li><a href="#acq.table.lineitem-detail">lineitem_detail</a></li><li><a href="#acq.table.lineitem-generated-attr-definition">lineitem_generated_attr_definition</a></li><li><a href="#acq.table.lineitem-local-attr-definition">lineitem_local_attr_definition</a></li><li><a href="#acq.table.lineitem-marc-attr-definition">lineitem_marc_attr_definition</a></li><li><a href="#acq.table.lineitem-note">lineitem_note</a></li><li><a href="#acq.table.lineitem-provider-attr-definition">lineitem_provider_attr_definition</a></li><li><a href="#acq.table.lineitem-usr-attr-definition">lineitem_usr_attr_definition</a></li><li><a href="#acq.table.picklist">picklist</a></li><li><a href="#acq.table.po-note">po_note</a></li><li><a href="#acq.table.provider">provider</a></li><li><a href="#acq.table.provider-address">provider_address</a></li><li><a href="#acq.table.provider-contact">provider_contact</a></li><li><a href="#acq.table.provider-contact-address">provider_contact_address</a></li><li><a href="#acq.table.provider-holding-subfield-map">provider_holding_subfield_map</a></li><li><a href="#acq.table.purchase-order">purchase_order</a></li>
+  	<li><a href="#acq.function.exchange-ratio-text-text-numeric">exchange_ratio(text, text, numeric)</a></li><li><a href="#acq.function.exchange-ratio-to-ex-text-from-ex-text">exchange_ratio(to_ex text, from_ex text)</a></li><li><a href="#acq.function.extract-holding-attr-table-tag-integer-lineitem-text">extract_holding_attr_table(tag integer, lineitem text)</a></li><li><a href="#acq.function.extract-provider-holding-data-lineitem-i-integer">extract_provider_holding_data(lineitem_i integer)</a></li>
+    </ul>
+    
+    <li><a name="action.schema">action</a></li><ul>
+    	<li><a href="#action.table.aged-circulation">aged_circulation</a></li><li><a href="#action.view.all-circulation">all_circulation</a></li><li><a href="#action.view.billable-circulations">billable_circulations</a></li><li><a href="#action.table.circulation">circulation</a></li><li><a href="#action.table.hold-copy-map">hold_copy_map</a></li><li><a href="#action.table.hold-notification">hold_notification</a></li><li><a href="#action.table.hold-request">hold_request</a></li><li><a href="#action.table.hold-request-cancel-cause">hold_request_cancel_cause</a></li><li><a href="#action.table.hold-transit-copy">hold_transit_copy</a></li><li><a href="#action.table.in-house-use">in_house_use</a></li><li><a href="#action.table.non-cat-in-house-use">non_cat_in_house_use</a></li><li><a href="#action.table.non-cataloged-circulation">non_cataloged_circulation</a></li><li><a href="#action.view.open-circulation">open_circulation</a></li><li><a href="#action.table.survey">survey</a></li><li><a href="#action.table.survey-answer">survey_answer</a></li><li><a href="#action.table.survey-question">survey_question</a></li><li><a href="#action.table.survey-response">survey_response</a></li><li><a href="#action.table.transit-copy">transit_copy</a></li><li><a href="#action.table.unfulfilled-hold-list">unfulfilled_hold_list</a></li>
+  	<li><a href="#action.function.age-circ-on-delete">age_circ_on_delete()</a></li><li><a href="#action.function.circulation-claims-returned">circulation_claims_returned()</a></li><li><a href="#action.function.find-circ-matrix-matchpoint-renewal-integer-match-user-bigint-match-item-integer-context-ou-boolean">find_circ_matrix_matchpoint(renewal integer, match_user bigint, match_item integer, context_ou boolean)</a></li><li><a href="#action.function.find-hold-matrix-matchpoint-match-requestor-integer-match-user-integer-match-item-bigint-request-ou-integer-pickup-ou-integer">find_hold_matrix_matchpoint(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)</a></li><li><a href="#action.function.hold-request-permit-test-match-requestor-integer-match-user-integer-match-item-bigint-request-ou-integer-pickup-ou-integer">hold_request_permit_test(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)</a></li><li><a href="#action.function.item-user-circ-test-integer-bigint-integer">item_user_circ_test(integer, bigint, integer)</a></li><li><a href="#action.function.item-user-circ-test-renewal-integer-match-user-bigint-match-item-integer-circ-ou-boolean">item_user_circ_test(renewal integer, match_user bigint, match_item integer, circ_ou boolean)</a></li><li><a href="#action.function.item-user-renew-test-integer-bigint-integer">item_user_renew_test(integer, bigint, integer)</a></li><li><a href="#action.function.survey-response-answer-date-fixup">survey_response_answer_date_fixup()</a></li>
+    </ul>
+    
+    <li><a name="action-trigger.schema">action_trigger</a></li><ul>
+    	<li><a href="#action-trigger.table.cleanup">cleanup</a></li><li><a href="#action-trigger.table.collector">collector</a></li><li><a href="#action-trigger.table.environment">environment</a></li><li><a href="#action-trigger.table.event">event</a></li><li><a href="#action-trigger.table.event-definition">event_definition</a></li><li><a href="#action-trigger.table.event-output">event_output</a></li><li><a href="#action-trigger.table.event-params">event_params</a></li><li><a href="#action-trigger.table.hook">hook</a></li><li><a href="#action-trigger.table.reactor">reactor</a></li><li><a href="#action-trigger.table.validator">validator</a></li>
+  	
+    </ul>
+    
+    <li><a name="actor.schema">actor</a></li><ul>
+    	<li><a href="#actor.table.card">card</a></li><li><a href="#actor.table.hours-of-operation">hours_of_operation</a></li><li><a href="#actor.table.org-address">org_address</a></li><li><a href="#actor.table.org-lasso">org_lasso</a></li><li><a href="#actor.table.org-lasso-map">org_lasso_map</a></li><li><a href="#actor.table.org-unit">org_unit</a></li><li><a href="#actor.table.org-unit-closed">org_unit_closed</a></li><li><a href="#actor.table.org-unit-proximity">org_unit_proximity</a></li><li><a href="#actor.table.org-unit-setting">org_unit_setting</a></li><li><a href="#actor.table.org-unit-type">org_unit_type</a></li><li><a href="#actor.table.stat-cat">stat_cat</a></li><li><a href="#actor.table.stat-cat-entry">stat_cat_entry</a></li><li><a href="#actor.table.stat-cat-entry-usr-map">stat_cat_entry_usr_map</a></li><li><a href="#actor.table.usr">usr</a></li><li><a href="#actor.table.usr-address">usr_address</a></li><li><a href="#actor.table.usr-note">usr_note</a></li><li><a href="#actor.table.usr-org-unit-opt-in">usr_org_unit_opt_in</a></li><li><a href="#actor.table.usr-setting">usr_setting</a></li><li><a href="#actor.table.usr-standing-penalty">usr_standing_penalty</a></li><li><a href="#actor.table.workstation">workstation</a></li>
+  	<li><a href="#actor.function.approve-pending-address-pending-id-integer">approve_pending_address(pending_id integer)</a></li><li><a href="#actor.function.calculate-system-penalties-context-org-integer-match-user-integer">calculate_system_penalties(context_org integer, match_user integer)</a></li><li><a href="#actor.function.crypt-pw-insert">crypt_pw_insert()</a></li><li><a href="#actor.function.crypt-pw-update">crypt_pw_update()</a></li><li><a href="#actor.function.org-unit-ancestor-at-depth-integer-integer">org_unit_ancestor_at_depth(integer, integer)</a></li><li><a href="#actor.function.org-unit-ancestor-setting-org-id-text-setting-name-integer">org_unit_ancestor_setting(org_id text, setting_name integer)</a></li><li><a href="#actor.function.org-unit-ancestors-integer">org_unit_ancestors(integer)</a></li><li><a href="#actor.function.org-unit-combined-ancestors-integer-integer">org_unit_combined_ancestors(integer, integer)</a></li><li><a href="#actor.function.org-unit-common-ancestors-integer-integer">org_unit_common_ancestors(integer, integer)</a></li><li><a href="#actor.function.org-unit-descendants-integer">org_unit_descendants(integer)</a></li><li><a href="#actor.function.org-unit-descendants-integer-integer">org_unit_descendants(integer, integer)</a></li><li><a href="#actor.function.org-unit-full-path-integer">org_unit_full_path(integer)</a></li><li><a href="#actor.function.org-unit-full-path-integer-integer">org_unit_full_path(integer, integer)</a></li><li><a href="#actor.function.org-unit-proximity-integer-integer">org_unit_proximity(integer, integer)</a></li><li><a href="#actor.function.usr-merge-deactivate-cards-integer-del-cards-integer-del-addrs-boolean-dest-usr-boolean-src-usr-boolean">usr_merge(deactivate_cards integer, del_cards integer, del_addrs boolean, dest_usr boolean, src_usr boolean)</a></li><li><a href="#actor.function.usr-merge-rows-dest-usr-text-src-usr-text-col-name-integer-table-name-integer">usr_merge_rows(dest_usr text, src_usr text, col_name integer, table_name integer)</a></li>
+    </ul>
+    
+    <li><a name="asset.schema">asset</a></li><ul>
+    	<li><a href="#asset.table.call-number">call_number</a></li><li><a href="#asset.table.call-number-note">call_number_note</a></li><li><a href="#asset.table.copy">copy</a></li><li><a href="#asset.table.copy-location">copy_location</a></li><li><a href="#asset.table.copy-note">copy_note</a></li><li><a href="#asset.table.copy-transparency">copy_transparency</a></li><li><a href="#asset.table.copy-transparency-map">copy_transparency_map</a></li><li><a href="#asset.table.stat-cat">stat_cat</a></li><li><a href="#asset.table.stat-cat-entry">stat_cat_entry</a></li><li><a href="#asset.table.stat-cat-entry-copy-map">stat_cat_entry_copy_map</a></li><li><a href="#asset.table.stat-cat-entry-transparency-map">stat_cat_entry_transparency_map</a></li><li><a href="#asset.table.uri">uri</a></li><li><a href="#asset.table.uri-call-number-map">uri_call_number_map</a></li>
+  	<li><a href="#asset.function.merge-record-assets-source-record-bigint-target-record-bigint">merge_record_assets(source_record bigint, target_record bigint)</a></li>
+    </ul>
+    
+    <li><a name="auditor.schema">auditor</a></li><ul>
+    	<li><a href="#auditor.table.actor-org-unit-history">actor_org_unit_history</a></li><li><a href="#auditor.view.actor-org-unit-lifecycle">actor_org_unit_lifecycle</a></li><li><a href="#auditor.table.actor-usr-address-history">actor_usr_address_history</a></li><li><a href="#auditor.view.actor-usr-address-lifecycle">actor_usr_address_lifecycle</a></li><li><a href="#auditor.table.actor-usr-history">actor_usr_history</a></li><li><a href="#auditor.view.actor-usr-lifecycle">actor_usr_lifecycle</a></li><li><a href="#auditor.table.asset-call-number-history">asset_call_number_history</a></li><li><a href="#auditor.view.asset-call-number-lifecycle">asset_call_number_lifecycle</a></li><li><a href="#auditor.table.asset-copy-history">asset_copy_history</a></li><li><a href="#auditor.view.asset-copy-lifecycle">asset_copy_lifecycle</a></li><li><a href="#auditor.table.biblio-record-entry-history">biblio_record_entry_history</a></li><li><a href="#auditor.view.biblio-record-entry-lifecycle">biblio_record_entry_lifecycle</a></li>
+  	<li><a href="#auditor.function.audit-actor-org-unit-func">audit_actor_org_unit_func()</a></li><li><a href="#auditor.function.audit-actor-usr-address-func">audit_actor_usr_address_func()</a></li><li><a href="#auditor.function.audit-actor-usr-func">audit_actor_usr_func()</a></li><li><a href="#auditor.function.audit-asset-call-number-func">audit_asset_call_number_func()</a></li><li><a href="#auditor.function.audit-asset-copy-func">audit_asset_copy_func()</a></li><li><a href="#auditor.function.audit-biblio-record-entry-func">audit_biblio_record_entry_func()</a></li><li><a href="#auditor.function.create-auditor-tbl-text-sch-text">create_auditor(tbl text, sch text)</a></li>
+    </ul>
+    
+    <li><a name="authority.schema">authority</a></li><ul>
+    	<li><a href="#authority.table.full-rec">full_rec</a></li><li><a href="#authority.table.rec-descriptor">rec_descriptor</a></li><li><a href="#authority.table.record-entry">record_entry</a></li><li><a href="#authority.table.record-note">record_note</a></li><li><a href="#authority.view.tracing-links">tracing_links</a></li>
+  	
+    </ul>
+    
+    <li><a name="biblio.schema">biblio</a></li><ul>
+    	<li><a href="#biblio.table.record-entry">record_entry</a></li><li><a href="#biblio.table.record-note">record_note</a></li>
+  	<li><a href="#biblio.function.next-autogen-tcn-value">next_autogen_tcn_value()</a></li>
+    </ul>
+    
+    <li><a name="config.schema">config</a></li><ul>
+    	<li><a href="#config.table.audience-map">audience_map</a></li><li><a href="#config.table.bib-level-map">bib_level_map</a></li><li><a href="#config.table.bib-source">bib_source</a></li><li><a href="#config.table.billing-type">billing_type</a></li><li><a href="#config.table.circ-matrix-circ-mod-test">circ_matrix_circ_mod_test</a></li><li><a href="#config.table.circ-matrix-circ-mod-test-map">circ_matrix_circ_mod_test_map</a></li><li><a href="#config.table.circ-matrix-matchpoint">circ_matrix_matchpoint</a></li><li><a href="#config.table.circ-modifier">circ_modifier</a></li><li><a href="#config.table.copy-status">copy_status</a></li><li><a href="#config.table.hold-matrix-matchpoint">hold_matrix_matchpoint</a></li><li><a href="#config.table.i18n-core">i18n_core</a></li><li><a href="#config.table.i18n-locale">i18n_locale</a></li><li><a href="#config.table.identification-type">identification_type</a></li><li><a href="#config.table.idl-field-doc">idl_field_doc</a></li><li><a href="#config.table.item-form-map">item_form_map</a></li><li><a href="#config.table.item-type-map">item_type_map</a></li><li><a href="#config.table.language-map">language_map</a></li><li><a href="#config.table.lit-form-map">lit_form_map</a></li><li><a href="#config.table.metabib-field">metabib_field</a></li><li><a href="#config.table.net-access-level">net_access_level</a></li><li><a href="#config.table.non-cataloged-type">non_cataloged_type</a></li><li><a href="#config.table.rule-age-hold-protect">rule_age_hold_protect</a></li><li><a href="#config.table.rule-circ-duration">rule_circ_duration</a></li><li><a href="#config.table.rule-max-fine">rule_max_fine</a></li><li><a href="#config.table.rule-recuring-fine">rule_recuring_fine</a></li><li><a href="#config.table.standing">standing</a></li><li><a href="#config.table.standing-penalty">standing_penalty</a></li><li><a href="#config.table.upgrade-log">upgrade_log</a></li><li><a href="#config.table.videorecording-format-map">videorecording_format_map</a></li><li><a href="#config.table.xml-transform">xml_transform</a></li><li><a href="#config.table.z3950-attr">z3950_attr</a></li><li><a href="#config.table.z3950-source">z3950_source</a></li>
+  	
+    </ul>
+    
+    <li><a name="container.schema">container</a></li><ul>
+    	<li><a href="#container.table.biblio-record-entry-bucket">biblio_record_entry_bucket</a></li><li><a href="#container.table.biblio-record-entry-bucket-item">biblio_record_entry_bucket_item</a></li><li><a href="#container.table.biblio-record-entry-bucket-item-note">biblio_record_entry_bucket_item_note</a></li><li><a href="#container.table.biblio-record-entry-bucket-note">biblio_record_entry_bucket_note</a></li><li><a href="#container.table.biblio-record-entry-bucket-type">biblio_record_entry_bucket_type</a></li><li><a href="#container.table.call-number-bucket">call_number_bucket</a></li><li><a href="#container.table.call-number-bucket-item">call_number_bucket_item</a></li><li><a href="#container.table.call-number-bucket-item-note">call_number_bucket_item_note</a></li><li><a href="#container.table.call-number-bucket-note">call_number_bucket_note</a></li><li><a href="#container.table.call-number-bucket-type">call_number_bucket_type</a></li><li><a href="#container.table.copy-bucket">copy_bucket</a></li><li><a href="#container.table.copy-bucket-item">copy_bucket_item</a></li><li><a href="#container.table.copy-bucket-item-note">copy_bucket_item_note</a></li><li><a href="#container.table.copy-bucket-note">copy_bucket_note</a></li><li><a href="#container.table.copy-bucket-type">copy_bucket_type</a></li><li><a href="#container.table.user-bucket">user_bucket</a></li><li><a href="#container.table.user-bucket-item">user_bucket_item</a></li><li><a href="#container.table.user-bucket-item-note">user_bucket_item_note</a></li><li><a href="#container.table.user-bucket-note">user_bucket_note</a></li><li><a href="#container.table.user-bucket-type">user_bucket_type</a></li>
+  	
+    </ul>
+    
+    <li><a name="extend-reporter.schema">extend_reporter</a></li><ul>
+    	<li><a href="#extend-reporter.view.full-circ-count">full_circ_count</a></li><li><a href="#extend-reporter.view.global-bibs-by-holding-update">global_bibs_by_holding_update</a></li><li><a href="#extend-reporter.table.legacy-circ-count">legacy_circ_count</a></li>
+  	
+    </ul>
+    
+    <li><a name="metabib.schema">metabib</a></li><ul>
+    	<li><a href="#metabib.table.author-field-entry">author_field_entry</a></li><li><a href="#metabib.view.full-rec">full_rec</a></li><li><a href="#metabib.table.keyword-field-entry">keyword_field_entry</a></li><li><a href="#metabib.table.metarecord">metarecord</a></li><li><a href="#metabib.table.metarecord-source-map">metarecord_source_map</a></li><li><a href="#metabib.table.real-full-rec">real_full_rec</a></li><li><a href="#metabib.table.rec-descriptor">rec_descriptor</a></li><li><a href="#metabib.table.series-field-entry">series_field_entry</a></li><li><a href="#metabib.table.subject-field-entry">subject_field_entry</a></li><li><a href="#metabib.table.title-field-entry">title_field_entry</a></li>
+  	
+    </ul>
+    
+    <li><a name="money.schema">money</a></li><ul>
+    	<li><a href="#money.table.billable-xact">billable_xact</a></li><li><a href="#money.view.billable-xact-summary">billable_xact_summary</a></li><li><a href="#money.view.billable-xact-with-void-summary">billable_xact_with_void_summary</a></li><li><a href="#money.table.billing">billing</a></li><li><a href="#money.table.bnm-desk-payment">bnm_desk_payment</a></li><li><a href="#money.table.bnm-payment">bnm_payment</a></li><li><a href="#money.view.bnm-payment-view">bnm_payment_view</a></li><li><a href="#money.table.cash-payment">cash_payment</a></li><li><a href="#money.view.cashdrawer-payment-view">cashdrawer_payment_view</a></li><li><a href="#money.table.check-payment">check_payment</a></li><li><a href="#money.table.collections-tracker">collections_tracker</a></li><li><a href="#money.table.credit-card-payment">credit_card_payment</a></li><li><a href="#money.table.credit-payment">credit_payment</a></li><li><a href="#money.view.desk-payment-view">desk_payment_view</a></li><li><a href="#money.table.forgive-payment">forgive_payment</a></li><li><a href="#money.table.goods-payment">goods_payment</a></li><li><a href="#money.table.grocery">grocery</a></li><li><a href="#money.table.materialized-billable-xact-summary">materialized_billable_xact_summary</a></li><li><a href="#money.view.non-drawer-payment-view">non_drawer_payment_view</a></li><li><a href="#money.view.open-billable-xact-summary">open_billable_xact_summary</a></li><li><a href="#money.view.open-transaction-billing-summary">open_transaction_billing_summary</a></li><li><a href="#money.view.open-transaction-billing-type-summary">open_transaction_billing_type_summary</a></li><li><a href="#money.view.open-transaction-payment-summary">open_transaction_payment_summary</a></li><li><a href="#money.view.open-usr-circulation-summary">open_usr_circulation_summary</a></li><li><a href="#money.view.open-usr-summary">open_usr_summary</a></li><li><a href="#money.table.payment">payment</a></li><li><a href="#money.view.payment-view">payment_view</a></li><li><a href="#money.view.transaction-billing-summary">transaction_billing_summary</a></li><li><a href="#money.view.transaction-billing-type-summary">transaction_billing_type_summary</a></li><li><a href="#money.view.transaction-billing-with-void-summary">transaction_billing_with_void_summary</a></li><li><a href="#money.view.transaction-payment-summary">transaction_payment_summary</a></li><li><a href="#money.view.transaction-payment-with-void-summary">transaction_payment_with_void_summary</a></li><li><a href="#money.view.usr-circulation-summary">usr_circulation_summary</a></li><li><a href="#money.view.usr-summary">usr_summary</a></li><li><a href="#money.table.work-payment">work_payment</a></li>
+  	<li><a href="#money.function.mat-summary-create">mat_summary_create()</a></li><li><a href="#money.function.mat-summary-delete">mat_summary_delete()</a></li><li><a href="#money.function.mat-summary-update">mat_summary_update()</a></li><li><a href="#money.function.materialized-summary-billing-add">materialized_summary_billing_add()</a></li><li><a href="#money.function.materialized-summary-billing-del">materialized_summary_billing_del()</a></li><li><a href="#money.function.materialized-summary-billing-update">materialized_summary_billing_update()</a></li><li><a href="#money.function.materialized-summary-payment-add">materialized_summary_payment_add()</a></li><li><a href="#money.function.materialized-summary-payment-del">materialized_summary_payment_del()</a></li><li><a href="#money.function.materialized-summary-payment-update">materialized_summary_payment_update()</a></li>
+    </ul>
+    
+    <li><a name="offline.schema">offline</a></li><ul>
+    	<li><a href="#offline.table.script">script</a></li><li><a href="#offline.table.session">session</a></li>
+  	
+    </ul>
+    
+    <li><a name="permission.schema">permission</a></li><ul>
+    	<li><a href="#permission.table.grp-penalty-threshold">grp_penalty_threshold</a></li><li><a href="#permission.table.grp-perm-map">grp_perm_map</a></li><li><a href="#permission.table.grp-tree">grp_tree</a></li><li><a href="#permission.table.perm-list">perm_list</a></li><li><a href="#permission.table.usr-grp-map">usr_grp_map</a></li><li><a href="#permission.table.usr-object-perm-map">usr_object_perm_map</a></li><li><a href="#permission.table.usr-perm-map">usr_perm_map</a></li><li><a href="#permission.table.usr-work-ou-map">usr_work_ou_map</a></li>
+  	<li><a href="#permission.function.grp-ancestors-integer">grp_ancestors(integer)</a></li><li><a href="#permission.function.usr-can-grant-perm-target-ou-integer-tperm-text-iuser-integer">usr_can_grant_perm(target_ou integer, tperm text, iuser integer)</a></li><li><a href="#permission.function.usr-has-home-perm-target-ou-integer-tperm-text-iuser-integer">usr_has_home_perm(target_ou integer, tperm text, iuser integer)</a></li><li><a href="#permission.function.usr-has-object-perm-integer-text-text-text">usr_has_object_perm(integer, text, text, text)</a></li><li><a href="#permission.function.usr-has-object-perm-target-ou-integer-obj-id-text-obj-type-text-tperm-text-iuser-integer">usr_has_object_perm(target_ou integer, obj_id text, obj_type text, tperm text, iuser integer)</a></li><li><a href="#permission.function.usr-has-perm-integer-text-integer">usr_has_perm(integer, text, integer)</a></li><li><a href="#permission.function.usr-has-perm-at-perm-code-integer-user-id-text">usr_has_perm_at(perm_code integer, user_id text)</a></li><li><a href="#permission.function.usr-has-perm-at-all-perm-code-integer-user-id-text">usr_has_perm_at_all(perm_code integer, user_id text)</a></li><li><a href="#permission.function.usr-has-perm-at-all-nd-perm-code-integer-user-id-text">usr_has_perm_at_all_nd(perm_code integer, user_id text)</a></li><li><a href="#permission.function.usr-has-perm-at-nd-perm-code-integer-user-id-text">usr_has_perm_at_nd(perm_code integer, user_id text)</a></li><li><a href="#permission.function.usr-has-work-perm-target-ou-integer-tperm-text-iuser-integer">usr_has_work_perm(target_ou integer, tperm text, iuser integer)</a></li><li><a href="#permission.function.usr-perms-integer">usr_perms(integer)</a></li>
+    </ul>
+    
+    <li><a name="public.schema">public</a></li><ul>
+    	
+  	<li><a href="#public.function.-get-parser-from-curcfg">_get_parser_from_curcfg()</a></li><li><a href="#public.function.agg-text-text">agg_text(text)</a></li><li><a href="#public.function.agg-tsvector-tsvector">agg_tsvector(tsvector)</a></li><li><a href="#public.function.array-accum-anyelement">array_accum(anyelement)</a></li><li><a href="#public.function.call-number-dewey-text">call_number_dewey(text)</a></li><li><a href="#public.function.call-number-dewey-text-integer">call_number_dewey(text, integer)</a></li><li><a href="#public.function.cleanup-acq-marc">cleanup_acq_marc()</a></li><li><a href="#public.function.concat-tsvector-tsvector">concat(tsvector, tsvector)</a></li><li><a href="#public.function.connectby-text-text-text-text-integer">connectby(text, text, text, text, integer)</a></li><li><a href="#public.function.connectby-text-text-text-text-integer-text">connectby(text, text, text, text, integer, text)</a></li><li><a href="#public.function.connectby-text-text-text-text-text-integer">connectby(text, text, text, text, text, integer)</a></li><li><a href="#public.function.connectby-text-text-text-text-text-integer-text">connectby(text, text, text, text, text, integer, text)</a></li><li><a href="#public.function.crosstab-text">crosstab(text)</a></li><li><a href="#public.function.crosstab-text-integer">crosstab(text, integer)</a></li><li><a href="#public.function.crosstab-text-text">crosstab(text, text)</a></li><li><a href="#public.function.crosstab2-text">crosstab2(text)</a></li><li><a href="#public.function.crosstab3-text">crosstab3(text)</a></li><li><a href="#public.function.crosstab4-text">crosstab4(text)</a></li><li><a href="#public.function.dex-init-internal">dex_init(internal)</a></li><li><a href="#public.function.dex-lexize-internal-internal-integer">dex_lexize(internal, internal, integer)</a></li><li><a href="#public.function.entityize-text">entityize(text)</a></li><li><a href="#public.function.explode-array-anyarray">explode_array(anyarray)</a></li><li><a href="#public.function.extract-acq-marc-field-bigint-text-text">extract_acq_marc_field(bigint, text, text)</a></li><li><a href="#public.function.extract-marc-field-text-bigint-text">extract_marc_field(text, bigint, text)</a></li><li><a href="#public.function.extract-marc-field-text-bigint-text-text">extract_marc_field(text, bigint, text, text)</a></li><li><a href="#public.function.first-anyelement">first(anyelement)</a></li><li><a href="#public.function.first5-text">first5(text)</a></li><li><a href="#public.function.first-agg-anyelement-anyelement">first_agg(anyelement, anyelement)</a></li><li><a href="#public.function.first-word-text">first_word(text)</a></li><li><a href="#public.function.get-covers-tsvector-tsquery">get_covers(tsvector, tsquery)</a></li><li><a href="#public.function.headline-oid-text-tsquery">headline(oid, text, tsquery)</a></li><li><a href="#public.function.headline-oid-text-tsquery-text">headline(oid, text, tsquery, text)</a></li><li><a href="#public.function.headline-text-text-tsquery">headline(text, text, tsquery)</a></li><li><a href="#public.function.headline-text-text-tsquery-text">headline(text, text, tsquery, text)</a></li><li><a href="#public.function.headline-text-tsquery">headline(text, tsquery)</a></li><li><a href="#public.function.headline-text-tsquery-text">headline(text, tsquery, text)</a></li><li><a href="#public.function.ingest-acq-marc">ingest_acq_marc()</a></li><li><a href="#public.function.last-anyelement">last(anyelement)</a></li><li><a href="#public.function.last-agg-anyelement-anyelement">last_agg(anyelement, anyelement)</a></li><li><a href="#public.function.length-tsvector">length(tsvector)</a></li><li><a href="#public.function.lexize-oid-text">lexize(oid, text)</a></li><li><a href="#public.function.lexize-text">lexize(text)</a></li><li><a href="#public.function.lexize-text-text">lexize(text, text)</a></li><li><a href="#public.function.lowercase-text">lowercase(text)</a></li><li><a href="#public.function.naco-normalize-text">naco_normalize(text)</a></li><li><a href="#public.function.naco-normalize-text-text">naco_normalize(text, text)</a></li><li><a href="#public.function.non-filing-normalize-text-char">non_filing_normalize(text, &quot;char&quot;)</a></li><li><a href="#public.function.normal-rand-integer-double-precision-double-precision">normal_rand(integer, double precision, double precision)</a></li><li><a href="#public.function.normalize-space-text">normalize_space(text)</a></li><li><a href="#public.function.numnode-tsquery">numnode(tsquery)</a></li><li><a href="#public.function.oils-i18n-gettext-integer-text-text-text">oils_i18n_gettext(integer, text, text, text)</a></li><li><a href="#public.function.oils-i18n-gettext-text-text-text-text">oils_i18n_gettext(text, text, text, text)</a></li><li><a href="#public.function.oils-i18n-xlate-raw-locale-text-keyvalue-text-identcol-text-keycol-text-keyclass-text-keytable-text">oils_i18n_xlate(raw_locale text, keyvalue text, identcol text, keycol text, keyclass text, keytable text)</a></li><li><a href="#public.function.oils-tsearch2">oils_tsearch2()</a></li><li><a href="#public.function.parse-oid-text">parse(oid, text)</a></li><li><a href="#public.function.parse-text">parse(text)</a></li><li><a href="#public.function.parse-text-text">parse(text, text)</a></li><li><a href="#public.function.plainto-tsquery-oid-text">plainto_tsquery(oid, text)</a></li><li><a href="#public.function.plainto-tsquery-text">plainto_tsquery(text)</a></li><li><a href="#public.function.plainto-tsquery-text-text">plainto_tsquery(text, text)</a></li><li><a href="#public.function.prsd-end-internal">prsd_end(internal)</a></li><li><a href="#public.function.prsd-getlexeme-internal-internal-internal">prsd_getlexeme(internal, internal, internal)</a></li><li><a href="#public.function.prsd-headline-internal-internal-internal">prsd_headline(internal, internal, internal)</a></li><li><a href="#public.function.prsd-lextype-internal">prsd_lextype(internal)</a></li><li><a href="#public.function.prsd-start-internal-integer">prsd_start(internal, integer)</a></li><li><a href="#public.function.querytree-tsquery">querytree(tsquery)</a></li><li><a href="#public.function.rank-realARRAY-tsvector-tsquery">rank(real[], tsvector, tsquery)</a></li><li><a href="#public.function.rank-realARRAY-tsvector-tsquery-integer">rank(real[], tsvector, tsquery, integer)</a></li><li><a href="#public.function.rank-tsvector-tsquery">rank(tsvector, tsquery)</a></li><li><a href="#public.function.rank-tsvector-tsquery-integer">rank(tsvector, tsquery, integer)</a></li><li><a href="#public.function.rank-cd-realARRAY-tsvector-tsquery">rank_cd(real[], tsvector, tsquery)</a></li><li><a href="#public.function.rank-cd-realARRAY-tsvector-tsquery-integer">rank_cd(real[], tsvector, tsquery, integer)</a></li><li><a href="#public.function.rank-cd-tsvector-tsquery">rank_cd(tsvector, tsquery)</a></li><li><a href="#public.function.rank-cd-tsvector-tsquery-integer">rank_cd(tsvector, tsquery, integer)</a></li><li><a href="#public.function.remove-diacritics-text">remove_diacritics(text)</a></li><li><a href="#public.function.reset-tsearch">reset_tsearch()</a></li><li><a href="#public.function.rewrite-tsquery-text">rewrite(tsquery, text)</a></li><li><a href="#public.function.rewrite-tsquery-tsquery-tsquery">rewrite(tsquery, tsquery, tsquery)</a></li><li><a href="#public.function.rewrite-tsqueryARRAY">rewrite(tsquery[])</a></li><li><a href="#public.function.rewrite-accum-tsquery-tsqueryARRAY">rewrite_accum(tsquery, tsquery[])</a></li><li><a href="#public.function.rewrite-finish-tsquery">rewrite_finish(tsquery)</a></li><li><a href="#public.function.set-curcfg-integer">set_curcfg(integer)</a></li><li><a href="#public.function.set-curcfg-text">set_curcfg(text)</a></li><li><a href="#public.function.set-curdict-integer">set_curdict(integer)</a></li><li><a href="#public.function.set-curdict-text">set_curdict(text)</a></li><li><a href="#public.function.set-curprs-integer">set_curprs(integer)</a></li><li><a href="#public.function.set-curprs-text">set_curprs(text)</a></li><li><a href="#public.function.setweight-tsvector-char">setweight(tsvector, &quot;char&quot;)</a></li><li><a href="#public.function.show-curcfg">show_curcfg()</a></li><li><a href="#public.function.snb-en-init-internal">snb_en_init(internal)</a></li><li><a href="#public.function.snb-lexize-internal-internal-integer">snb_lexize(internal, internal, integer)</a></li><li><a href="#public.function.snb-ru-init-internal">snb_ru_init(internal)</a></li><li><a href="#public.function.snb-ru-init-koi8-internal">snb_ru_init_koi8(internal)</a></li><li><a href="#public.function.snb-ru-init-utf8-internal">snb_ru_init_utf8(internal)</a></li><li><a href="#public.function.spell-init-internal">spell_init(internal)</a></li><li><a href="#public.function.spell-lexize-internal-internal-integer">spell_lexize(internal, internal, integer)</a></li><li><a href="#public.function.stat-text">stat(text)</a></li><li><a href="#public.function.stat-text-text">stat(text, text)</a></li><li><a href="#public.function.strip-tsvector">strip(tsvector)</a></li><li><a href="#public.function.syn-init-internal">syn_init(internal)</a></li><li><a href="#public.function.syn-lexize-internal-internal-integer">syn_lexize(internal, internal, integer)</a></li><li><a href="#public.function.tableoid2name-oid">tableoid2name(oid)</a></li><li><a href="#public.function.text-concat-text-text">text_concat(text, text)</a></li><li><a href="#public.function.thesaurus-init-internal">thesaurus_init(internal)</a></li><li><a href="#public.function.thesaurus-lexize-internal-internal-integer-internal">thesaurus_lexize(internal, internal, integer, internal)</a></li><li><a href="#public.function.to-tsquery-oid-text">to_tsquery(oid, text)</a></li><li><a href="#public.function.to-tsquery-text">to_tsquery(text)</a></li><li><a href="#public.function.to-tsquery-text-text">to_tsquery(text, text)</a></li><li><a href="#public.function.to-tsvector-oid-text">to_tsvector(oid, text)</a></li><li><a href="#public.function.to-tsvector-text">to_tsvector(text)</a></li><li><a href="#public.function.to-tsvector-text-text">to_tsvector(text, text)</a></li><li><a href="#public.function.token-type">token_type()</a></li><li><a href="#public.function.token-type-integer">token_type(integer)</a></li><li><a href="#public.function.token-type-text">token_type(text)</a></li><li><a href="#public.function.ts-debug-text">ts_debug(text)</a></li><li><a href="#public.function.tsearch2">tsearch2()</a></li><li><a href="#public.function.tsq-mcontained-tsquery-tsquery">tsq_mcontained(tsquery, tsquery)</a></li><li><a href="#public.function.tsq-mcontains-tsquery-tsquery">tsq_mcontains(tsquery, tsquery)</a></li><li><a href="#public.function.tsquery-and-tsquery-tsquery">tsquery_and(tsquery, tsquery)</a></li><li><a href="#public.function.tsquery-not-tsquery">tsquery_not(tsquery)</a></li><li><a href="#public.function.tsquery-or-tsquery-tsquery">tsquery_or(tsquery, tsquery)</a></li><li><a href="#public.function.tsvector-concat-tsvector-tsvector">tsvector_concat(tsvector, tsvector)</a></li><li><a href="#public.function.uppercase-text">uppercase(text)</a></li><li><a href="#public.function.xml-encode-special-chars-text">xml_encode_special_chars(text)</a></li><li><a href="#public.function.xml-is-well-formed-text">xml_is_well_formed(text)</a></li><li><a href="#public.function.xml-valid-text">xml_valid(text)</a></li><li><a href="#public.function.xpath-bool-text-text">xpath_bool(text, text)</a></li><li><a href="#public.function.xpath-list-text-text">xpath_list(text, text)</a></li><li><a href="#public.function.xpath-list-text-text-text">xpath_list(text, text, text)</a></li><li><a href="#public.function.xpath-nodeset-text-text">xpath_nodeset(text, text)</a></li><li><a href="#public.function.xpath-nodeset-text-text-text">xpath_nodeset(text, text, text)</a></li><li><a href="#public.function.xpath-nodeset-text-text-text-text">xpath_nodeset(text, text, text, text)</a></li><li><a href="#public.function.xpath-number-text-text">xpath_number(text, text)</a></li><li><a href="#public.function.xpath-string-text-text">xpath_string(text, text)</a></li><li><a href="#public.function.xpath-table-text-text-text-text-text">xpath_table(text, text, text, text, text)</a></li><li><a href="#public.function.xslt-process-text-text">xslt_process(text, text)</a></li><li><a href="#public.function.xslt-process-text-text-text">xslt_process(text, text, text)</a></li>
+    </ul>
+    
+    <li><a name="reporter.schema">reporter</a></li><ul>
+    	<li><a href="#reporter.view.circ-type">circ_type</a></li><li><a href="#reporter.view.currently-running">currently_running</a></li><li><a href="#reporter.view.demographic">demographic</a></li><li><a href="#reporter.view.hold-request-record">hold_request_record</a></li><li><a href="#reporter.table.materialized-simple-record">materialized_simple_record</a></li><li><a href="#reporter.view.old-super-simple-record">old_super_simple_record</a></li><li><a href="#reporter.table.output-folder">output_folder</a></li><li><a href="#reporter.view.overdue-circs">overdue_circs</a></li><li><a href="#reporter.view.overdue-reports">overdue_reports</a></li><li><a href="#reporter.view.pending-reports">pending_reports</a></li><li><a href="#reporter.table.report">report</a></li><li><a href="#reporter.table.report-folder">report_folder</a></li><li><a href="#reporter.table.schedule">schedule</a></li><li><a href="#reporter.view.simple-record">simple_record</a></li><li><a href="#reporter.view.super-simple-record">super_simple_record</a></li><li><a href="#reporter.table.template">template</a></li><li><a href="#reporter.table.template-folder">template_folder</a></li><li><a href="#reporter.view.xact-billing-totals">xact_billing_totals</a></li><li><a href="#reporter.view.xact-paid-totals">xact_paid_totals</a></li>
+  	<li><a href="#reporter.function.disable-materialized-simple-record-trigger">disable_materialized_simple_record_trigger()</a></li><li><a href="#reporter.function.enable-materialized-simple-record-trigger">enable_materialized_simple_record_trigger()</a></li><li><a href="#reporter.function.refresh-materialized-simple-record">refresh_materialized_simple_record()</a></li><li><a href="#reporter.function.simple-rec-bib-sync">simple_rec_bib_sync()</a></li><li><a href="#reporter.function.simple-rec-delete-r-id-bigint">simple_rec_delete(r_id bigint)</a></li><li><a href="#reporter.function.simple-rec-sync">simple_rec_sync()</a></li><li><a href="#reporter.function.simple-rec-update-deleted-bigint-r-id-boolean">simple_rec_update(deleted bigint, r_id boolean)</a></li><li><a href="#reporter.function.simple-rec-update-r-id-bigint">simple_rec_update(r_id bigint)</a></li>
+    </ul>
+    
+    <li><a name="search.schema">search</a></li><ul>
+    	<li><a href="#search.table.relevance-adjustment">relevance_adjustment</a></li>
+  	<li><a href="#search.function.explode-array-anyarray">explode_array(anyarray)</a></li><li><a href="#search.function.parse-search-args-text">parse_search_args(text)</a></li><li><a href="#search.function.pick-table-text">pick_table(text)</a></li><li><a href="#search.function.staged-fts-param-skip-chk-integer-param-chk-limit-integer-param-rel-limit-text-staff-integerARRAY-metarecord-integerARRAY-param-sort-desc-textARRAY-param-sort-textARRAY-param-pref-lang-multiplier-textARRAY-param-pref-lang-textARRAY-param-between-textARRAY-param-during-textARRAY-param-after-textARRAY-param-before-text-param-bib-level-text-param-vformats-text-param-forms-textARRAY-param-types-text-param-lit-form-real-param-language-text-param-audience-boolean-param-locations-boolean-param-statuses-boolean-param-searches-integer-param-depth-integer-param-search-ou-integer">staged_fts(param_skip_chk integer, param_chk_limit integer, param_rel_limit text, staff integer[], metarecord integer[], param_sort_desc text[], param_sort text[], param_pref_lang_multiplier text[], param_pref_lang text[], param_between text[], param_during text[], param_after text[], param_before text, param_bib_level text, param_vformats text, param_forms text[], param_types text, param_lit_form real, param_language text, param_audience boolean, param_locations boolean, param_statuses boolean, param_searches integer, param_depth integer, param_search_ou integer)</a></li>
+    </ul>
+    
+    <li><a name="serial.schema">serial</a></li><ul>
+    	<li><a href="#serial.table.bib-summary">bib_summary</a></li><li><a href="#serial.table.binding-unit">binding_unit</a></li><li><a href="#serial.table.index-summary">index_summary</a></li><li><a href="#serial.table.issuance">issuance</a></li><li><a href="#serial.table.record-entry">record_entry</a></li><li><a href="#serial.table.subscription">subscription</a></li><li><a href="#serial.table.sup-summary">sup_summary</a></li>
+  	
+    </ul>
+    
+    <li><a name="stats.schema">stats</a></li><ul>
+    	<li><a href="#stats.view.fleshed-call-number">fleshed_call_number</a></li><li><a href="#stats.view.fleshed-circulation">fleshed_circulation</a></li><li><a href="#stats.view.fleshed-copy">fleshed_copy</a></li>
+  	
+    </ul>
+    
+    <li><a name="vandelay.schema">vandelay</a></li><ul>
+    	<li><a href="#vandelay.table.authority-attr-definition">authority_attr_definition</a></li><li><a href="#vandelay.table.authority-match">authority_match</a></li><li><a href="#vandelay.table.authority-queue">authority_queue</a></li><li><a href="#vandelay.table.bib-attr-definition">bib_attr_definition</a></li><li><a href="#vandelay.table.bib-match">bib_match</a></li><li><a href="#vandelay.table.bib-queue">bib_queue</a></li><li><a href="#vandelay.table.import-bib-trash-fields">import_bib_trash_fields</a></li><li><a href="#vandelay.table.import-item">import_item</a></li><li><a href="#vandelay.table.import-item-attr-definition">import_item_attr_definition</a></li><li><a href="#vandelay.table.queue">queue</a></li><li><a href="#vandelay.table.queued-authority-record">queued_authority_record</a></li><li><a href="#vandelay.table.queued-authority-record-attr">queued_authority_record_attr</a></li><li><a href="#vandelay.table.queued-bib-record">queued_bib_record</a></li><li><a href="#vandelay.table.queued-bib-record-attr">queued_bib_record_attr</a></li><li><a href="#vandelay.table.queued-record">queued_record</a></li>
+  	<li><a href="#vandelay.function.cleanup-authority-marc">cleanup_authority_marc()</a></li><li><a href="#vandelay.function.cleanup-bib-marc">cleanup_bib_marc()</a></li><li><a href="#vandelay.function.ingest-authority-marc">ingest_authority_marc()</a></li><li><a href="#vandelay.function.ingest-bib-items">ingest_bib_items()</a></li><li><a href="#vandelay.function.ingest-bib-marc">ingest_bib_marc()</a></li><li><a href="#vandelay.function.ingest-items-attr-def-id-bigint-import-id-bigint">ingest_items(attr_def_id bigint, import_id bigint)</a></li><li><a href="#vandelay.function.match-bib-record">match_bib_record()</a></li><li><a href="#vandelay.function.strip-field-field-text-xml-text">strip_field(field text, xml text)</a></li>
+    </ul>
+    
+</ul>
+
+    <!-- Schema Creation -->
+    <!-- acqacq -->
+
+		
+		<hr>
+		<h1>Schema acq</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.currency-type">currency_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.currency_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.exchange-rate">acq.exchange_rate</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund">acq.fund</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund-debit">acq.fund_debit</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.funding-source">acq.funding_source</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.provider">acq.provider</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.distribution-formula">distribution_formula</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.distribution_formula Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>skip_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.distribution-formula-entry">acq.distribution_formula_entry</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.distribution-formula-entry">distribution_formula_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.distribution_formula_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#acq.table.distribution-formula">acq.distribution_formula.id</a>
+                  
+                
+                </td>
+            	<td>formula</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>position</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy-location">asset.copy_location.id</a>
+                  
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>acq.distribution_formula_entry Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>acqdfe_must_be_somewhere</td>
+                <td>CHECK (((owning_lib IS NOT NULL) OR (location IS NOT NULL)))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.exchange-rate">exchange_rate</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.exchange_rate Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>from_currency</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                </td>
+            	<td>to_currency</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ratio</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.fund">fund</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>org</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>year</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT date_part(&#39;year&#39;::text, now())
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                </td>
+            	<td>currency_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.fund-allocation">acq.fund_allocation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund-debit">acq.fund_debit</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund-tag-map">acq.fund_tag_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.fund-allocation">fund_allocation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_allocation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.funding-source">acq.funding_source.id</a>
+                  
+                
+                </td>
+            	<td>funding_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.fund">acq.fund.id</a>
+                  
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>percent</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>allocator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>acq.fund_allocation Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>allocation_amount_or_percent</td>
+                <td>CHECK ((((percent IS NULL) AND (amount IS NOT NULL)) OR ((percent IS NOT NULL) AND (amount IS NULL))))</td>
+            </tr>
+			
+            <tr class="tr1">
+				<td>fund_allocation_percent_check</td>
+                <td>CHECK (((percent IS NULL) OR ((percent &gt;= 0.0) AND (percent &lt;= 100.0))))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-allocation-total">fund_allocation_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_allocation_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(100,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT x.fund
+, (sum
+     (x.amount)
+)::numeric
+(100
+     ,2
+) AS amount 
+FROM (
+SELECT a.fund
+     , (sum
+           (
+                 (a.amount * acq.exchange_ratio
+                       (s.currency_type
+                             , f.currency_type
+                       )
+                 )
+           )
+     )::numeric
+     (100
+           ,2
+     ) AS amount 
+  FROM (
+           (acq.fund_allocation a 
+              JOIN acq.fund f 
+                ON (
+                       (a.fund = f.id)
+                 )
+           )
+        JOIN acq.funding_source s 
+          ON (
+                 (a.funding_source = s.id)
+           )
+     )
+ WHERE (a.percent IS NULL)
+GROUP BY a.fund 
+UNION ALLSELECT a.fund
+     , (sum
+           (
+                 (
+                       (
+                             (
+                              SELECT sum
+                                   (c.amount) AS sum 
+                                FROM acq.funding_source_credit c 
+                               WHERE (c.funding_source = a.funding_source)
+                             ) * acq.exchange_ratio
+                             (s.currency_type
+                                   , f.currency_type
+                             )
+                       ) * 
+                       (a.percent / 100.0)
+                 )
+           )
+     )::numeric
+     (100
+           ,2
+     ) AS amount 
+  FROM (
+           (acq.fund_allocation a 
+              JOIN acq.fund f 
+                ON (
+                       (a.fund = f.id)
+                 )
+           )
+        JOIN acq.funding_source s 
+          ON (
+                 (a.funding_source = s.id)
+           )
+     )
+ WHERE (a.amount IS NULL)
+GROUP BY a.fund
+) x 
+GROUP BY x.fund;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-combined-balance">fund_combined_balance</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_combined_balance Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT c.fund
+, (c.amount - COALESCE
+     (d.amount
+           , 0.0
+     )
+) AS amount 
+FROM (acq.fund_allocation_total c 
+LEFT JOIN acq.fund_debit_total d 
+ USING (fund)
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.fund-debit">fund_debit</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_debit Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.fund">acq.fund.id</a>
+                  
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>origin_amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                </td>
+            	<td>origin_currency_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>encumbrance</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>debit_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.fund">acq.fund.id</a>
+                  
+                
+                </td>
+            	<td>xfer_destination</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-debit-total">fund_debit_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_debit_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>encumbrance</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT fund_debit.id AS fund
+, fund_debit.encumbrance
+, sum
+(fund_debit.amount) AS amount 
+FROM acq.fund_debit 
+GROUP BY fund_debit.id
+, fund_debit.encumbrance;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-encumbrance-total">fund_encumbrance_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_encumbrance_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT fund_debit_total.fund
+, sum
+(fund_debit_total.amount) AS amount 
+FROM acq.fund_debit_total 
+WHERE (fund_debit_total.encumbrance IS TRUE)
+GROUP BY fund_debit_total.fund;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-spent-balance">fund_spent_balance</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_spent_balance Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT c.fund
+, (c.amount - COALESCE
+     (d.amount
+           , 0.0
+     )
+) AS amount 
+FROM (acq.fund_allocation_total c 
+LEFT JOIN acq.fund_spent_total d 
+ USING (fund)
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.fund-spent-total">fund_spent_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_spent_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT fund_debit_total.fund
+, sum
+(fund_debit_total.amount) AS amount 
+FROM acq.fund_debit_total 
+WHERE (fund_debit_total.encumbrance IS FALSE)
+GROUP BY fund_debit_total.fund;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.fund-tag">fund_tag</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_tag Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.fund-tag-map">acq.fund_tag_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.fund-tag-map">fund_tag_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.fund_tag_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#acq.table.fund">acq.fund.id</a>
+                  
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#acq.table.fund-tag">acq.fund_tag.id</a>
+                  
+                
+                </td>
+            	<td>tag</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.funding-source">funding_source</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.funding_source Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                </td>
+            	<td>currency_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.fund-allocation">acq.fund_allocation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.funding-source-credit">acq.funding_source_credit</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.funding-source-allocation-total">funding_source_allocation_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.funding_source_allocation_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>funding_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(100,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT x.funding_source
+, (sum
+     (x.amount)
+)::numeric
+(100
+     ,2
+) AS amount 
+FROM (
+SELECT a.funding_source
+     , (sum
+           (a.amount)
+     )::numeric
+     (100
+           ,2
+     ) AS amount 
+  FROM acq.fund_allocation a 
+ WHERE (a.percent IS NULL)
+GROUP BY a.funding_source 
+UNION ALLSELECT a.funding_source
+     , (sum
+           (
+                 (
+                       (
+                        SELECT sum
+                             (c.amount) AS sum 
+                          FROM acq.funding_source_credit c 
+                         WHERE (c.funding_source = a.funding_source)
+                       ) * 
+                       (a.percent / 100.0)
+                 )
+           )
+     )::numeric
+     (100
+           ,2
+     ) AS amount 
+  FROM acq.fund_allocation a 
+ WHERE (a.amount IS NULL)
+GROUP BY a.funding_source
+) x 
+GROUP BY x.funding_source;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.funding-source-balance">funding_source_balance</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.funding_source_balance Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>funding_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(100,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT COALESCE
+(c.funding_source
+     , a.funding_source
+) AS funding_source
+, (sum
+     (
+           (COALESCE
+                 (c.amount
+                       , 0.0
+                 ) - COALESCE
+                 (a.amount
+                       , 0.0
+                 )
+           )
+     )
+)::numeric
+(100
+     ,2
+) AS amount 
+FROM (acq.funding_source_credit_total c FULL 
+  JOIN acq.funding_source_allocation_total a 
+ USING (funding_source)
+)
+GROUP BY COALESCE
+(c.funding_source
+     , a.funding_source
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.funding-source-credit">funding_source_credit</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.funding_source_credit Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.funding-source">acq.funding_source.id</a>
+                  
+                
+                </td>
+            	<td>funding_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.view.funding-source-credit-total">funding_source_credit_total</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.funding_source_credit_total Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>funding_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT funding_source_credit.funding_source
+, sum
+(funding_source_credit.amount) AS amount 
+FROM acq.funding_source_credit 
+GROUP BY funding_source_credit.funding_source;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem">lineitem</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>selector</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.purchase-order">acq.purchase_order.id</a>
+                  
+                
+                </td>
+            	<td>purchase_order</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.picklist">acq.picklist.id</a>
+                  
+                
+                </td>
+            	<td>picklist</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>expected_recv_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>eg_bib_id</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>source_label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;new&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>acq.lineitem Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>picklist_or_po</td>
+                <td>CHECK (((picklist IS NOT NULL) OR (purchase_order IS NOT NULL)))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-attr">acq.lineitem_attr</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-note">acq.lineitem_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       li_pl_idx picklist
+    
+       li_po_idx purchase_order
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-attr">lineitem_attr</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_attr Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>definition</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.lineitem">acq.lineitem.id</a>
+                  
+                
+                </td>
+            	<td>lineitem</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>attr_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>attr_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>attr_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       li_attr_definition_idx definition
+    
+       li_attr_li_idx lineitem
+    
+       li_attr_value_idx attr_value
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-attr-definition">lineitem_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-detail">lineitem_detail</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_detail Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.lineitem">acq.lineitem.id</a>
+                  
+                
+                </td>
+            	<td>lineitem</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.fund">acq.fund.id</a>
+                  
+                
+                </td>
+            	<td>fund</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.fund-debit">acq.fund_debit.id</a>
+                  
+                
+                </td>
+            	<td>fund_debit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>eg_copy_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cn_label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>collection_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-modifier">config.circ_modifier.code</a>
+                  
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy-location">asset.copy_location.id</a>
+                  
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>recv_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       li_detail_li_idx lineitem
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-generated-attr-definition">lineitem_generated_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_generated_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;acq.lineitem_attr_definition_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table acq.lineitem_generated_attr_definition Inherits
+        
+            
+           <a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-local-attr-definition">lineitem_local_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_local_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;acq.lineitem_attr_definition_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table acq.lineitem_local_attr_definition Inherits
+        
+            
+           <a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-marc-attr-definition">lineitem_marc_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_marc_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;acq.lineitem_attr_definition_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table acq.lineitem_marc_attr_definition Inherits
+        
+            
+           <a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-note">lineitem_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.lineitem">acq.lineitem.id</a>
+                  
+                
+                </td>
+            	<td>lineitem</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       li_note_li_idx lineitem
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-provider-attr-definition">lineitem_provider_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_provider_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;acq.lineitem_attr_definition_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table acq.lineitem_provider_attr_definition Inherits
+        
+            
+           <a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.lineitem-usr-attr-definition">lineitem_usr_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.lineitem_usr_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;acq.lineitem_attr_definition_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table acq.lineitem_usr_attr_definition Inherits
+        
+            
+           <a href="#acq.table.lineitem-attr-definition">lineitem_attr_definition</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.picklist">picklist</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.picklist Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem">acq.lineitem</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.po-note">po_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.po_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.purchase-order">acq.purchase_order.id</a>
+                  
+                
+                </td>
+            	<td>purchase_order</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       po_note_po_idx purchase_order
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.provider">provider</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.provider Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.currency-type">acq.currency_type.code</a>
+                  
+                
+                </td>
+            	<td>currency_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holding_tag</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem">acq.lineitem</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-provider-attr-definition">acq.lineitem_provider_attr_definition</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.provider-address">acq.provider_address</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.provider-contact">acq.provider_contact</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.provider-holding-subfield-map">acq.provider_holding_subfield_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.purchase-order">acq.purchase_order</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.provider-address">provider_address</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.provider_address Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.provider-contact">provider_contact</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.provider_contact Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>role</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.provider-contact-address">acq.provider_contact_address</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.provider-contact-address">provider_contact_address</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.provider_contact_address Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider-contact">acq.provider_contact.id</a>
+                  
+                
+                </td>
+            	<td>contact</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.provider-holding-subfield-map">provider_holding_subfield_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.provider_holding_subfield_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>subfield</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#acq.schema">acq</a>.<a name="acq.table.purchase-order">purchase_order</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>acq.purchase_order Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>ordering_agency</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#acq.table.provider">acq.provider.id</a>
+                  
+                
+                </td>
+            	<td>provider</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;new&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem">acq.lineitem</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.po-note">acq.po_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       po_owner_idx owner
+    
+       po_provider_idx provider
+    
+       po_state_idx state
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#acq.schema">Schema acq</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#acq.schema">acq</a>.<a name="acq.function.exchange-ratio-text-text-numeric">exchange_ratio(text, text, numeric)</a>
+		</h2>
+<h3>Returns: numeric</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT $3 * acq.exchange_ratio($1, $2);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#acq.schema">acq</a>.<a name="acq.function.exchange-ratio-to-ex-text-from-ex-text">exchange_ratio(to_ex text, from_ex text)</a>
+		</h2>
+<h3>Returns: numeric</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    rat NUMERIC;
+BEGIN
+    IF from_ex = to_ex THEN
+        RETURN 1.0;
+    END IF;
+
+    SELECT ratio INTO rat FROM acq.exchange_rate WHERE from_currency = from_ex AND to_currency = to_ex;
+
+    IF FOUND THEN
+        RETURN rat;
+    ELSE
+        SELECT ratio INTO rat FROM acq.exchange_rate WHERE from_currency = to_ex AND to_currency = from_ex;
+        IF FOUND THEN
+            RETURN 1.0/rat;
+        END IF;
+    END IF;
+
+    RETURN NULL;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#acq.schema">acq</a>.<a name="acq.function.extract-holding-attr-table-tag-integer-lineitem-text">extract_holding_attr_table(tag integer, lineitem text)</a>
+		</h2>
+<h3>Returns: SET OF flat_lineitem_holding_subfield</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    counter INT;
+    lida    acq.flat_lineitem_holding_subfield%ROWTYPE;
+BEGIN
+
+    SELECT  COUNT(*) INTO counter
+      FROM  xpath_table(
+                &#39;id&#39;,
+                &#39;marc&#39;,
+                &#39;acq.lineitem&#39;,
+                &#39;//*[@tag=&quot;&#39; || tag || &#39;&quot;]&#39;,
+                &#39;id=&#39; || lineitem
+            ) as t(i int,c text);
+
+    FOR i IN 1 .. counter LOOP
+        FOR lida IN
+            SELECT  * 
+              FROM  (   SELECT  id,i,t,v
+                          FROM  xpath_table(
+                                    &#39;id&#39;,
+                                    &#39;marc&#39;,
+                                    &#39;acq.lineitem&#39;,
+                                    &#39;//*[@tag=&quot;&#39; || tag || &#39;&quot;][position()=&#39; || i || &#39;]/*/@code|&#39; ||
+                                        &#39;//*[@tag=&quot;&#39; || tag || &#39;&quot;][position()=&#39; || i || &#39;]/*[@code]&#39;,
+                                    &#39;id=&#39; || lineitem
+                                ) as t(id int,t text,v text)
+                    )x
+        LOOP
+            RETURN NEXT lida;
+        END LOOP;
+    END LOOP;
+
+    RETURN;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#acq.schema">acq</a>.<a name="acq.function.extract-provider-holding-data-lineitem-i-integer">extract_provider_holding_data(lineitem_i integer)</a>
+		</h2>
+<h3>Returns: SET OF flat_lineitem_detail</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    prov_i  INT;
+    tag_t   TEXT;
+    lida    acq.flat_lineitem_detail%ROWTYPE;
+BEGIN
+    SELECT provider INTO prov_i FROM acq.lineitem WHERE id = lineitem_i;
+    IF NOT FOUND THEN RETURN; END IF;
+
+    SELECT holding_tag INTO tag_t FROM acq.provider WHERE id = prov_i;
+    IF NOT FOUND OR tag_t IS NULL THEN RETURN; END IF;
+
+    FOR lida IN
+        SELECT  lineitem_i,
+                h.holding,
+                a.name,
+                h.data
+          FROM  acq.extract_holding_attr_table( lineitem_i, tag_t ) h
+                JOIN acq.provider_holding_subfield_map a USING (subfield)
+          WHERE a.provider = prov_i
+    LOOP
+        RETURN NEXT lida;
+    END LOOP;
+
+    RETURN;
+END;
+</pre>
+	
+
+<!-- actionaction -->
+
+		
+		<hr>
+		<h1>Schema action</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.aged-circulation">aged_circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.aged_circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr_post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr_home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr_profile</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr_birth_year</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_call_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_bib_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       aged_circ_circ_lib_idx circ_lib
+    
+       aged_circ_copy_circ_lib_idx copy_circ_lib
+    
+       aged_circ_copy_location_idx copy_location
+    
+       aged_circ_copy_owning_lib_idx copy_owning_lib
+    
+       aged_circ_start_idx xact_start
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#action.schema">action</a>.<a name="action.view.all-circulation">all_circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.all_circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr_post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr_home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr_profile</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr_birth_year</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_bib_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT aged_circulation.id
+, aged_circulation.usr_post_code
+, aged_circulation.usr_home_ou
+, aged_circulation.usr_profile
+, aged_circulation.usr_birth_year
+, aged_circulation.copy_call_number
+, aged_circulation.copy_location
+, aged_circulation.copy_owning_lib
+, aged_circulation.copy_circ_lib
+, aged_circulation.copy_bib_record
+, aged_circulation.xact_start
+, aged_circulation.xact_finish
+, aged_circulation.target_copy
+, aged_circulation.circ_lib
+, aged_circulation.circ_staff
+, aged_circulation.checkin_staff
+, aged_circulation.checkin_lib
+, aged_circulation.renewal_remaining
+, aged_circulation.due_date
+, aged_circulation.stop_fines_time
+, aged_circulation.checkin_time
+, aged_circulation.create_time
+, aged_circulation.duration
+, aged_circulation.fine_interval
+, aged_circulation.recuring_fine
+, aged_circulation.max_fine
+, aged_circulation.phone_renewal
+, aged_circulation.desk_renewal
+, aged_circulation.opac_renewal
+, aged_circulation.duration_rule
+, aged_circulation.recuring_fine_rule
+, aged_circulation.max_fine_rule
+, aged_circulation.stop_fines 
+FROM action.aged_circulation 
+UNION ALL (
+SELECT DISTINCT circ.id
+     , COALESCE
+     (a.post_code
+           , b.post_code
+     ) AS usr_post_code
+     , p.home_ou AS usr_home_ou
+     , p.profile AS usr_profile
+     , (date_part
+           (&#39;year&#39;::text
+                 , p.dob
+           )
+     )::integer AS usr_birth_year
+     , cp.call_number AS copy_call_number
+     , cp.location AS copy_location
+     , cn.owning_lib AS copy_owning_lib
+     , cp.circ_lib AS copy_circ_lib
+     , cn.record AS copy_bib_record
+     , circ.xact_start
+     , circ.xact_finish
+     , circ.target_copy
+     , circ.circ_lib
+     , circ.circ_staff
+     , circ.checkin_staff
+     , circ.checkin_lib
+     , circ.renewal_remaining
+     , circ.due_date
+     , circ.stop_fines_time
+     , circ.checkin_time
+     , circ.create_time
+     , circ.duration
+     , circ.fine_interval
+     , circ.recuring_fine
+     , circ.max_fine
+     , circ.phone_renewal
+     , circ.desk_renewal
+     , circ.opac_renewal
+     , circ.duration_rule
+     , circ.recuring_fine_rule
+     , circ.max_fine_rule
+     , circ.stop_fines 
+  FROM (
+           (
+                 (
+                       (
+                             (action.circulation circ 
+                                JOIN asset.copy cp 
+                                  ON (
+                                         (circ.target_copy = cp.id)
+                                   )
+                             )
+                          JOIN asset.call_number cn 
+                            ON (
+                                   (cp.call_number = cn.id)
+                             )
+                       )
+                    JOIN actor.usr p 
+                      ON (
+                             (circ.usr = p.id)
+                       )
+                 )
+         LEFT JOIN actor.usr_address a 
+                ON (
+                       (p.mailing_address = a.id)
+                 )
+           )
+   LEFT JOIN actor.usr_address b 
+          ON (
+                 (p.billing_address = a.id)
+           )
+     )
+ORDER BY circ.id
+     , COALESCE
+     (a.post_code
+           , b.post_code
+     )
+     , p.home_ou
+     , p.profile
+     , (date_part
+           (&#39;year&#39;::text
+                 , p.dob
+           )
+     )::integer
+     , cp.call_number
+     , cp.location
+     , cn.owning_lib
+     , cp.circ_lib
+     , cn.record
+     , circ.xact_start
+     , circ.xact_finish
+     , circ.target_copy
+     , circ.circ_lib
+     , circ.circ_staff
+     , circ.checkin_staff
+     , circ.checkin_lib
+     , circ.renewal_remaining
+     , circ.due_date
+     , circ.stop_fines_time
+     , circ.checkin_time
+     , circ.create_time
+     , circ.duration
+     , circ.fine_interval
+     , circ.recuring_fine
+     , circ.max_fine
+     , circ.phone_renewal
+     , circ.desk_renewal
+     , circ.opac_renewal
+     , circ.duration_rule
+     , circ.recuring_fine_rule
+     , circ.max_fine_rule
+     , circ.stop_fines
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#action.schema">action</a>.<a name="action.view.billable-circulations">billable_circulations</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.billable_circulations Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT circulation.id
+, circulation.usr
+, circulation.xact_start
+, circulation.xact_finish
+, circulation.unrecovered
+, circulation.target_copy
+, circulation.circ_lib
+, circulation.circ_staff
+, circulation.checkin_staff
+, circulation.checkin_lib
+, circulation.renewal_remaining
+, circulation.due_date
+, circulation.stop_fines_time
+, circulation.checkin_time
+, circulation.create_time
+, circulation.duration
+, circulation.fine_interval
+, circulation.recuring_fine
+, circulation.max_fine
+, circulation.phone_renewal
+, circulation.desk_renewal
+, circulation.opac_renewal
+, circulation.duration_rule
+, circulation.recuring_fine_rule
+, circulation.max_fine_rule
+, circulation.stop_fines 
+FROM action.circulation 
+WHERE (circulation.xact_finish IS NULL);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.circulation">circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.billable_xact_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;1 day&#39;::interval
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table action.circulation Inherits
+        
+            
+           <a href="#money.table.billable-xact">billable_xact</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>action.circulation Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>circulation_stop_fines_check</td>
+                <td>CHECK ((stop_fines = ANY (ARRAY[&#39;CHECKIN&#39;::text, &#39;CLAIMSRETURNED&#39;::text, &#39;LOST&#39;::text, &#39;MAXFINES&#39;::text, &#39;RENEW&#39;::text, &#39;LONGOVERDUE&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       circ_checkin_time checkin_time) WHERE (checkin_time IS NOT NULL
+    
+       circ_circ_lib_idx circ_lib
+    
+       circ_open_date_idx xact_start) WHERE (xact_finish IS NULL
+    
+       circ_open_xacts_idx usr) WHERE (xact_finish IS NULL
+    
+       circ_outstanding_idx usr) WHERE (checkin_time IS NULL
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.hold-copy-map">hold_copy_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.hold_copy_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#action.table.hold-request">action.hold_request.id</a>
+                  
+                
+                </td>
+            	<td>hold</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       acm_copy_idx target_copy
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.hold-notification">hold_notification</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.hold_notification Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.hold-request">action.hold_request.id</a>
+                  
+                
+                </td>
+            	<td>hold</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>notify_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>notify_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>method</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       ahn_hold_idx hold
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.hold-request">hold_request</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.hold_request Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>request_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>capture_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fulfillment_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>return_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>prev_check_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>expire_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cancel_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.hold-request-cancel-cause">action.hold_request_cancel_cause.id</a>
+                  
+                
+                </td>
+            	<td>cancel_cause</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cancel_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>current_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>fulfillment_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>fulfillment_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>request_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>requestor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>selection_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>selection_depth</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>pickup_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>hold_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>holdable_formats</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_notify</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>email_notify</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>frozen</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>thaw_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>action.hold_request Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>hold_request_hold_type_check</td>
+                <td>CHECK ((hold_type = ANY (ARRAY[&#39;M&#39;::text, &#39;T&#39;::text, &#39;V&#39;::text, &#39;C&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.hold-copy-map">action.hold_copy_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-notification">action.hold_notification</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-transit-copy">action.hold_transit_copy</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       hold_request_current_copy_idx current_copy
+    
+       hold_request_pickup_lib_idx pickup_lib
+    
+       hold_request_prev_check_time_idx prev_check_time
+    
+       hold_request_target_idx target
+    
+       hold_request_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.hold-request-cancel-cause">hold_request_cancel_cause</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.hold_request_cancel_cause Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.hold-request">action.hold_request</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.hold-transit-copy">hold_transit_copy</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.hold_transit_copy Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;action.transit_copy_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source_send_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dest_recv_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dest</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>prev_hop</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_status</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>persistant_transfer</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.hold-request">action.hold_request.id</a>
+                  
+                
+                </td>
+            	<td>hold</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table action.hold_transit_copy Inherits
+        
+            
+           <a href="#action.table.transit-copy">transit_copy</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       active_hold_transit_cp_idx target_copy
+    
+       active_hold_transit_dest_idx dest
+    
+       active_hold_transit_source_idx source
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.in-house-use">in_house_use</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.in_house_use Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>item</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>use_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.non-cat-in-house-use">non_cat_in_house_use</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.non_cat_in_house_use Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.non-cataloged-type">config.non_cataloged_type.id</a>
+                  
+                
+                </td>
+            	<td>item_type</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>use_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.non-cataloged-circulation">non_cataloged_circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.non_cataloged_circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>patron</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.non-cataloged-type">config.non_cataloged_type.id</a>
+                  
+                
+                </td>
+            	<td>item_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#action.schema">action</a>.<a name="action.view.open-circulation">open_circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.open_circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT circulation.id
+, circulation.usr
+, circulation.xact_start
+, circulation.xact_finish
+, circulation.unrecovered
+, circulation.target_copy
+, circulation.circ_lib
+, circulation.circ_staff
+, circulation.checkin_staff
+, circulation.checkin_lib
+, circulation.renewal_remaining
+, circulation.due_date
+, circulation.stop_fines_time
+, circulation.checkin_time
+, circulation.create_time
+, circulation.duration
+, circulation.fine_interval
+, circulation.recuring_fine
+, circulation.max_fine
+, circulation.phone_renewal
+, circulation.desk_renewal
+, circulation.opac_renewal
+, circulation.duration_rule
+, circulation.recuring_fine_rule
+, circulation.max_fine_rule
+, circulation.stop_fines 
+FROM action.circulation 
+WHERE (circulation.checkin_time IS NULL)
+ORDER BY circulation.due_date;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.survey">survey</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.survey Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>start_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>end_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT (now() + &#39;10 years&#39;::interval)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr_summary</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>poll</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>required</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.survey-question">action.survey_question</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.survey-response">action.survey_response</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.survey-answer">survey_answer</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.survey_answer Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.survey-question">action.survey_question.id</a>
+                  
+                
+                </td>
+            	<td>question</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>answer</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.survey-response">action.survey_response</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.survey-question">survey_question</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.survey_question Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.survey">action.survey.id</a>
+                  
+                
+                </td>
+            	<td>survey</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>question</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.survey-answer">action.survey_answer</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.survey-response">action.survey_response</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.survey-response">survey_response</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.survey_response Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>response_group_id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.survey">action.survey.id</a>
+                  
+                
+                </td>
+            	<td>survey</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#action.table.survey-question">action.survey_question.id</a>
+                  
+                
+                </td>
+            	<td>question</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action.table.survey-answer">action.survey_answer.id</a>
+                  
+                
+                </td>
+            	<td>answer</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>answer_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>effective_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.transit-copy">transit_copy</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.transit_copy Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source_send_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dest_recv_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>dest</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#action.table.transit-copy">action.transit_copy.id</a>
+                  
+                
+                </td>
+            	<td>prev_hop</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.copy-status">config.copy_status.id</a>
+                  
+                
+                </td>
+            	<td>copy_status</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>persistant_transfer</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.transit-copy">action.transit_copy</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       active_transit_cp_idx target_copy
+    
+       active_transit_dest_idx dest
+    
+       active_transit_source_idx source
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action.schema">action</a>.<a name="action.table.unfulfilled-hold-list">unfulfilled_hold_list</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action.unfulfilled_hold_list Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>current_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>hold</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fail_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action.schema">Schema action</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.age-circ-on-delete">age_circ_on_delete()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	INSERT INTO action.aged_circulation
+		(id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
+		copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
+		circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date,
+		stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine,
+		max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule,
+		max_fine_rule, stop_fines)
+	  SELECT
+		id,usr_post_code, usr_home_ou, usr_profile, usr_birth_year, copy_call_number, copy_location,
+		copy_owning_lib, copy_circ_lib, copy_bib_record, xact_start, xact_finish, target_copy,
+		circ_lib, circ_staff, checkin_staff, checkin_lib, renewal_remaining, due_date,
+		stop_fines_time, checkin_time, create_time, duration, fine_interval, recuring_fine,
+		max_fine, phone_renewal, desk_renewal, opac_renewal, duration_rule, recuring_fine_rule,
+		max_fine_rule, stop_fines
+	    FROM action.all_circulation WHERE id = OLD.id;
+
+	RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.circulation-claims-returned">circulation_claims_returned()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	IF OLD.stop_fines IS NULL OR OLD.stop_fines &lt;&gt; NEW.stop_fines THEN
+		IF NEW.stop_fines = &#39;CLAIMSRETURNED&#39; THEN
+			UPDATE actor.usr SET claims_returned_count = claims_returned_count + 1 WHERE id = NEW.usr;
+		END IF;
+		IF NEW.stop_fines = &#39;LOST&#39; THEN
+			UPDATE asset.copy SET status = 3 WHERE id = NEW.target_copy;
+		END IF;
+	END IF;
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.find-circ-matrix-matchpoint-renewal-integer-match-user-bigint-match-item-integer-context-ou-boolean">find_circ_matrix_matchpoint(renewal integer, match_user bigint, match_item integer, context_ou boolean)</a>
+		</h2>
+<h3>Returns: circ_matrix_matchpoint</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    current_group    permission.grp_tree%ROWTYPE;
+    user_object    actor.usr%ROWTYPE;
+    item_object    asset.copy%ROWTYPE;
+    rec_descriptor    metabib.rec_descriptor%ROWTYPE;
+    current_mp    config.circ_matrix_matchpoint%ROWTYPE;
+    matchpoint    config.circ_matrix_matchpoint%ROWTYPE;
+BEGIN
+    SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+    SELECT INTO item_object * FROM asset.copy WHERE id = match_item;
+    SELECT INTO rec_descriptor r.* FROM metabib.rec_descriptor r JOIN asset.call_number c USING (record) WHERE c.id = item_object.call_number;
+    SELECT INTO current_group * FROM permission.grp_tree WHERE id = user_object.profile;
+
+    LOOP 
+        -- for each potential matchpoint for this ou and group ...
+        FOR current_mp IN
+            SELECT    m.*
+              FROM    config.circ_matrix_matchpoint m
+                JOIN actor.org_unit_ancestors( context_ou ) d ON (m.org_unit = d.id)
+                LEFT JOIN actor.org_unit_proximity p ON (p.from_org = context_ou AND p.to_org = d.id)
+              WHERE    m.grp = current_group.id AND m.active
+              ORDER BY    CASE WHEN p.prox        IS NULL THEN 999 ELSE p.prox END,
+                    CASE WHEN m.is_renewal = renewal        THEN 128 ELSE 0 END +
+                    CASE WHEN m.juvenile_flag    IS NOT NULL THEN 64 ELSE 0 END +
+                    CASE WHEN m.circ_modifier    IS NOT NULL THEN 32 ELSE 0 END +
+                    CASE WHEN m.marc_type        IS NOT NULL THEN 16 ELSE 0 END +
+                    CASE WHEN m.marc_form        IS NOT NULL THEN 8 ELSE 0 END +
+                    CASE WHEN m.marc_vr_format    IS NOT NULL THEN 4 ELSE 0 END +
+                    CASE WHEN m.ref_flag        IS NOT NULL THEN 2 ELSE 0 END +
+                    CASE WHEN m.usr_age_lower_bound    IS NOT NULL THEN 0.5 ELSE 0 END +
+                    CASE WHEN m.usr_age_upper_bound    IS NOT NULL THEN 0.5 ELSE 0 END DESC LOOP
+
+            IF current_mp.circ_modifier IS NOT NULL THEN
+                CONTINUE WHEN current_mp.circ_modifier &lt;&gt; item_object.circ_modifier OR item_object.circ_modifier IS NULL;
+            END IF;
+
+            IF current_mp.marc_type IS NOT NULL THEN
+                IF item_object.circ_as_type IS NOT NULL THEN
+                    CONTINUE WHEN current_mp.marc_type &lt;&gt; item_object.circ_as_type;
+                ELSE
+                    CONTINUE WHEN current_mp.marc_type &lt;&gt; rec_descriptor.item_type;
+                END IF;
+            END IF;
+
+            IF current_mp.marc_form IS NOT NULL THEN
+                CONTINUE WHEN current_mp.marc_form &lt;&gt; rec_descriptor.item_form;
+            END IF;
+
+            IF current_mp.marc_vr_format IS NOT NULL THEN
+                CONTINUE WHEN current_mp.marc_vr_format &lt;&gt; rec_descriptor.vr_format;
+            END IF;
+
+            IF current_mp.ref_flag IS NOT NULL THEN
+                CONTINUE WHEN current_mp.ref_flag &lt;&gt; item_object.ref;
+            END IF;
+
+            IF current_mp.juvenile_flag IS NOT NULL THEN
+                CONTINUE WHEN current_mp.juvenile_flag &lt;&gt; user_object.juvenile;
+            END IF;
+
+            IF current_mp.usr_age_lower_bound IS NOT NULL THEN
+                CONTINUE WHEN user_object.dob IS NULL OR current_mp.usr_age_lower_bound &lt; age(user_object.dob);
+            END IF;
+
+            IF current_mp.usr_age_upper_bound IS NOT NULL THEN
+                CONTINUE WHEN user_object.dob IS NULL OR current_mp.usr_age_upper_bound &gt; age(user_object.dob);
+            END IF;
+
+
+            -- everything was undefined or matched
+            matchpoint = current_mp;
+
+            EXIT WHEN matchpoint.id IS NOT NULL;
+        END LOOP;
+
+        EXIT WHEN current_group.parent IS NULL OR matchpoint.id IS NOT NULL;
+
+        SELECT INTO current_group * FROM permission.grp_tree WHERE id = current_group.parent;
+    END LOOP;
+
+    RETURN matchpoint;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.find-hold-matrix-matchpoint-match-requestor-integer-match-user-integer-match-item-bigint-request-ou-integer-pickup-ou-integer">find_hold_matrix_matchpoint(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    current_requestor_group    permission.grp_tree%ROWTYPE;
+    root_ou            actor.org_unit%ROWTYPE;
+    requestor_object    actor.usr%ROWTYPE;
+    user_object        actor.usr%ROWTYPE;
+    item_object        asset.copy%ROWTYPE;
+    item_cn_object        asset.call_number%ROWTYPE;
+    rec_descriptor        metabib.rec_descriptor%ROWTYPE;
+    current_mp_weight    FLOAT;
+    matchpoint_weight    FLOAT;
+    tmp_weight        FLOAT;
+    current_mp        config.hold_matrix_matchpoint%ROWTYPE;
+    matchpoint        config.hold_matrix_matchpoint%ROWTYPE;
+BEGIN
+    SELECT INTO root_ou * FROM actor.org_unit WHERE parent_ou IS NULL;
+    SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+    SELECT INTO requestor_object * FROM actor.usr WHERE id = match_requestor;
+    SELECT INTO item_object * FROM asset.copy WHERE id = match_item;
+    SELECT INTO item_cn_object * FROM asset.call_number WHERE id = item_object.call_number;
+    SELECT INTO rec_descriptor r.* FROM metabib.rec_descriptor r WHERE r.record = item_cn_object.record;
+    SELECT INTO current_requestor_group * FROM permission.grp_tree WHERE id = requestor_object.profile;
+
+    LOOP 
+        -- for each potential matchpoint for this ou and group ...
+        FOR current_mp IN
+            SELECT    m.*
+              FROM    config.hold_matrix_matchpoint m
+              WHERE    m.requestor_grp = current_requestor_group.id AND m.active
+              ORDER BY    CASE WHEN m.circ_modifier    IS NOT NULL THEN 16 ELSE 0 END +
+                    CASE WHEN m.juvenile_flag    IS NOT NULL THEN 16 ELSE 0 END +
+                    CASE WHEN m.marc_type        IS NOT NULL THEN 8 ELSE 0 END +
+                    CASE WHEN m.marc_form        IS NOT NULL THEN 4 ELSE 0 END +
+                    CASE WHEN m.marc_vr_format    IS NOT NULL THEN 2 ELSE 0 END +
+                    CASE WHEN m.ref_flag        IS NOT NULL THEN 1 ELSE 0 END DESC LOOP
+
+            current_mp_weight := 5.0;
+
+            IF current_mp.circ_modifier IS NOT NULL THEN
+                CONTINUE WHEN current_mp.circ_modifier &lt;&gt; item_object.circ_modifier OR item_object.circ_modifier IS NULL;
+            END IF;
+
+            IF current_mp.marc_type IS NOT NULL THEN
+                IF item_object.circ_as_type IS NOT NULL THEN
+                    CONTINUE WHEN current_mp.marc_type &lt;&gt; item_object.circ_as_type;
+                ELSE
+                    CONTINUE WHEN current_mp.marc_type &lt;&gt; rec_descriptor.item_type;
+                END IF;
+            END IF;
+
+            IF current_mp.marc_form IS NOT NULL THEN
+                CONTINUE WHEN current_mp.marc_form &lt;&gt; rec_descriptor.item_form;
+            END IF;
+
+            IF current_mp.marc_vr_format IS NOT NULL THEN
+                CONTINUE WHEN current_mp.marc_vr_format &lt;&gt; rec_descriptor.vr_format;
+            END IF;
+
+            IF current_mp.juvenile_flag IS NOT NULL THEN
+                CONTINUE WHEN current_mp.juvenile_flag &lt;&gt; user_object.juvenile;
+            END IF;
+
+            IF current_mp.ref_flag IS NOT NULL THEN
+                CONTINUE WHEN current_mp.ref_flag &lt;&gt; item_object.ref;
+            END IF;
+
+
+            -- caclulate the rule match weight
+            IF current_mp.item_owning_ou IS NOT NULL AND current_mp.item_owning_ou &lt;&gt; root_ou.id THEN
+                SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.item_owning_ou, item_cn_object.owning_lib)::FLOAT + 1.0)::FLOAT;
+                current_mp_weight := current_mp_weight - tmp_weight;
+            END IF; 
+
+            IF current_mp.item_circ_ou IS NOT NULL AND current_mp.item_circ_ou &lt;&gt; root_ou.id THEN
+                SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.item_circ_ou, item_object.circ_lib)::FLOAT + 1.0)::FLOAT;
+                current_mp_weight := current_mp_weight - tmp_weight;
+            END IF; 
+
+            IF current_mp.pickup_ou IS NOT NULL AND current_mp.pickup_ou &lt;&gt; root_ou.id THEN
+                SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.pickup_ou, pickup_ou)::FLOAT + 1.0)::FLOAT;
+                current_mp_weight := current_mp_weight - tmp_weight;
+            END IF; 
+
+            IF current_mp.request_ou IS NOT NULL AND current_mp.request_ou &lt;&gt; root_ou.id THEN
+                SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.request_ou, request_ou)::FLOAT + 1.0)::FLOAT;
+                current_mp_weight := current_mp_weight - tmp_weight;
+            END IF; 
+
+            IF current_mp.user_home_ou IS NOT NULL AND current_mp.user_home_ou &lt;&gt; root_ou.id THEN
+                SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.user_home_ou, user_object.home_ou)::FLOAT + 1.0)::FLOAT;
+                current_mp_weight := current_mp_weight - tmp_weight;
+            END IF; 
+
+            -- set the matchpoint if we found the best one
+            IF matchpoint_weight IS NULL OR matchpoint_weight &gt; current_mp_weight THEN
+                matchpoint = current_mp;
+                matchpoint_weight = current_mp_weight;
+            END IF;
+
+        END LOOP;
+
+        EXIT WHEN current_requestor_group.parent IS NULL OR matchpoint.id IS NOT NULL;
+
+        SELECT INTO current_requestor_group * FROM permission.grp_tree WHERE id = current_requestor_group.parent;
+    END LOOP;
+
+    RETURN matchpoint.id;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.hold-request-permit-test-match-requestor-integer-match-user-integer-match-item-bigint-request-ou-integer-pickup-ou-integer">hold_request_permit_test(match_requestor integer, match_user integer, match_item bigint, request_ou integer, pickup_ou integer)</a>
+		</h2>
+<h3>Returns: SET OF matrix_test_result</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    matchpoint_id        INT;
+    user_object        actor.usr%ROWTYPE;
+    age_protect_object    config.rule_age_hold_protect%ROWTYPE;
+    standing_penalty    config.standing_penalty%ROWTYPE;
+    transit_range_ou_type    actor.org_unit_type%ROWTYPE;
+    transit_source        actor.org_unit%ROWTYPE;
+    item_object        asset.copy%ROWTYPE;
+    result            action.matrix_test_result;
+    hold_test        config.hold_matrix_matchpoint%ROWTYPE;
+    hold_count        INT;
+    hold_transit_prox    INT;
+    frozen_hold_count    INT;
+    context_org_list    INT[];
+    done            BOOL := FALSE;
+BEGIN
+    SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+    SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( pickup_ou );
+
+    -- Fail if we couldn&#39;t find a user
+    IF user_object.id IS NULL THEN
+        result.fail_part := &#39;no_user&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+        RETURN;
+    END IF;
+
+    -- Fail if user is barred
+    IF user_object.barred IS TRUE THEN
+        result.fail_part := &#39;actor.usr.barred&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+        RETURN;
+    END IF;
+
+    SELECT INTO item_object * FROM asset.copy WHERE id = match_item;
+
+    -- Fail if we couldn&#39;t find a copy
+    IF item_object.id IS NULL THEN
+        result.fail_part := &#39;no_item&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+        RETURN;
+    END IF;
+
+    SELECT INTO matchpoint_id action.find_hold_matrix_matchpoint(pickup_ou, request_ou, match_item, match_user, match_requestor);
+
+    -- Fail if we couldn&#39;t find any matchpoint (requires a default)
+    IF matchpoint_id IS NULL THEN
+        result.fail_part := &#39;no_matchpoint&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+        RETURN;
+    END IF;
+
+    SELECT INTO hold_test * FROM config.hold_matrix_matchpoint WHERE id = matchpoint_id;
+
+    result.matchpoint := hold_test.id;
+    result.success := TRUE;
+
+    IF hold_test.holdable IS FALSE THEN
+        result.fail_part := &#39;config.hold_matrix_test.holdable&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    IF hold_test.transit_range IS NOT NULL THEN
+        SELECT INTO transit_range_ou_type * FROM actor.org_unit_type WHERE id = hold_test.transit_range;
+        IF hold_test.distance_is_from_owner THEN
+            SELECT INTO transit_source ou.* FROM actor.org_unit ou JOIN asset.call_number cn ON (cn.owning_lib = ou.id) WHERE cn.id = item_object.call_number;
+        ELSE
+            SELECT INTO transit_source * FROM actor.org_unit WHERE id = item_object.circ_lib;
+        END IF;
+
+        PERFORM * FROM actor.org_unit_descendants( transit_source.id, transit_range_ou_type.depth ) WHERE id = pickup_ou;
+
+        IF NOT FOUND THEN
+            result.fail_part := &#39;transit_range&#39;;
+            result.success := FALSE;
+            done := TRUE;
+            RETURN NEXT result;
+        END IF;
+    END IF;
+ 
+    FOR standing_penalty IN
+        SELECT  DISTINCT csp.*
+          FROM  actor.usr_standing_penalty usp
+                JOIN config.standing_penalty csp ON (csp.id = usp.standing_penalty)
+          WHERE usr = match_user
+                AND usp.org_unit IN ( SELECT * FROM explode_array(context_org_list) )
+                AND (usp.stop_date IS NULL or usp.stop_date &gt; NOW())
+                AND csp.block_list LIKE &#39;%HOLD%&#39; LOOP
+
+        result.fail_part := standing_penalty.name;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END LOOP;
+
+    IF hold_test.stop_blocked_user IS TRUE THEN
+        FOR standing_penalty IN
+            SELECT  DISTINCT csp.*
+              FROM  actor.usr_standing_penalty usp
+                    JOIN config.standing_penalty csp ON (csp.id = usp.standing_penalty)
+              WHERE usr = match_user
+                    AND usp.org_unit IN ( SELECT * FROM explode_array(context_org_list) )
+                    AND (usp.stop_date IS NULL or usp.stop_date &gt; NOW())
+                    AND csp.block_list LIKE &#39;%CIRC%&#39; LOOP
+    
+            result.fail_part := standing_penalty.name;
+            result.success := FALSE;
+            done := TRUE;
+            RETURN NEXT result;
+        END LOOP;
+    END IF;
+
+    IF hold_test.max_holds IS NOT NULL THEN
+        SELECT    INTO hold_count COUNT(*)
+          FROM    action.hold_request
+          WHERE    usr = match_user
+            AND fulfillment_time IS NULL
+            AND cancel_time IS NULL
+            AND CASE WHEN hold_test.include_frozen_holds THEN TRUE ELSE frozen IS FALSE END;
+
+        IF hold_count &gt;= hold_test.max_holds THEN
+            result.fail_part := &#39;config.hold_matrix_test.max_holds&#39;;
+            result.success := FALSE;
+            done := TRUE;
+            RETURN NEXT result;
+        END IF;
+    END IF;
+
+    IF item_object.age_protect IS NOT NULL THEN
+        SELECT INTO age_protect_object * FROM config.rule_age_hold_protect WHERE id = item_object.age_protect;
+
+        IF item_object.create_date + age_protect_object.age &gt; NOW() THEN
+            IF hold_test.distance_is_from_owner THEN
+                SELECT INTO hold_transit_prox prox FROM actor.org_unit_prox WHERE from_org = item_cn_object.owning_lib AND to_org = pickup_ou;
+            ELSE
+                SELECT INTO hold_transit_prox prox FROM actor.org_unit_prox WHERE from_org = item_object.circ_lib AND to_org = pickup_ou;
+            END IF;
+
+            IF hold_transit_prox &gt; age_protect_object.prox THEN
+                result.fail_part := &#39;config.rule_age_hold_protect.prox&#39;;
+                result.success := FALSE;
+                done := TRUE;
+                RETURN NEXT result;
+            END IF;
+        END IF;
+    END IF;
+
+    IF NOT done THEN
+        RETURN NEXT result;
+    END IF;
+
+    RETURN;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.item-user-circ-test-integer-bigint-integer">item_user_circ_test(integer, bigint, integer)</a>
+		</h2>
+<h3>Returns: SET OF matrix_test_result</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT * FROM action.item_user_circ_test( $1, $2, $3, FALSE );
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.item-user-circ-test-renewal-integer-match-user-bigint-match-item-integer-circ-ou-boolean">item_user_circ_test(renewal integer, match_user bigint, match_item integer, circ_ou boolean)</a>
+		</h2>
+<h3>Returns: SET OF matrix_test_result</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    user_object        actor.usr%ROWTYPE;
+    standing_penalty    config.standing_penalty%ROWTYPE;
+    item_object        asset.copy%ROWTYPE;
+    item_status_object    config.copy_status%ROWTYPE;
+    item_location_object    asset.copy_location%ROWTYPE;
+    result            action.matrix_test_result;
+    circ_test        config.circ_matrix_matchpoint%ROWTYPE;
+    out_by_circ_mod        config.circ_matrix_circ_mod_test%ROWTYPE;
+    circ_mod_map        config.circ_matrix_circ_mod_test_map%ROWTYPE;
+    penalty_type         TEXT;
+    tmp_grp         INT;
+    items_out        INT;
+    context_org_list        INT[];
+    done            BOOL := FALSE;
+BEGIN
+    result.success := TRUE;
+
+    -- Fail if the user is BARRED
+    SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+
+    -- Fail if we couldn&#39;t find a set of tests
+    IF user_object.id IS NULL THEN
+        result.fail_part := &#39;no_user&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+        RETURN;
+    END IF;
+
+    IF user_object.barred IS TRUE THEN
+        result.fail_part := &#39;actor.usr.barred&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    -- Fail if the item can&#39;t circulate
+    SELECT INTO item_object * FROM asset.copy WHERE id = match_item;
+    IF item_object.circulate IS FALSE THEN
+        result.fail_part := &#39;asset.copy.circulate&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    -- Fail if the item isn&#39;t in a circulateable status on a non-renewal
+    IF NOT renewal AND item_object.status NOT IN ( 0, 7, 8 ) THEN 
+        result.fail_part := &#39;asset.copy.status&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    ELSIF renewal AND item_object.status &lt;&gt; 1 THEN
+        result.fail_part := &#39;asset.copy.status&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    -- Fail if the item can&#39;t circulate because of the shelving location
+    SELECT INTO item_location_object * FROM asset.copy_location WHERE id = item_object.location;
+    IF item_location_object.circulate IS FALSE THEN
+        result.fail_part := &#39;asset.copy_location.circulate&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    SELECT INTO circ_test * FROM action.find_circ_matrix_matchpoint(circ_ou, match_item, match_user, renewal);
+    result.matchpoint := circ_test.id;
+
+    SELECT INTO context_org_list ARRAY_ACCUM(id) FROM actor.org_unit_full_path( circ_test.org_unit );
+
+    -- Fail if we couldn&#39;t find a set of tests
+    IF result.matchpoint IS NULL THEN
+        result.fail_part := &#39;no_matchpoint&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    -- Fail if the test is set to hard non-circulating
+    IF circ_test.circulate IS FALSE THEN
+        result.fail_part := &#39;config.circ_matrix_test.circulate&#39;;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END IF;
+
+    IF renewal THEN
+        penalty_type = &#39;%RENEW%&#39;;
+    ELSE
+        penalty_type = &#39;%CIRC%&#39;;
+    END IF;
+
+    FOR standing_penalty IN
+        SELECT  DISTINCT csp.*
+          FROM  actor.usr_standing_penalty usp
+                JOIN config.standing_penalty csp ON (csp.id = usp.standing_penalty)
+          WHERE usr = match_user
+                AND usp.org_unit IN ( SELECT * FROM explode_array(context_org_list) )
+                AND (usp.stop_date IS NULL or usp.stop_date &gt; NOW())
+                AND csp.block_list LIKE penalty_type LOOP
+
+        result.fail_part := standing_penalty.name;
+        result.success := FALSE;
+        done := TRUE;
+        RETURN NEXT result;
+    END LOOP;
+
+    -- Fail if the user has too many items with specific circ_modifiers checked out
+    FOR out_by_circ_mod IN SELECT * FROM config.circ_matrix_circ_mod_test WHERE matchpoint = circ_test.id LOOP
+        SELECT  INTO items_out COUNT(*)
+          FROM  action.circulation circ
+            JOIN asset.copy cp ON (cp.id = circ.target_copy)
+          WHERE circ.usr = match_user
+               AND circ_lib IN ( SELECT * FROM explode_array(context_org_list) )
+            AND circ.checkin_time IS NULL
+            AND (circ.stop_fines IN (&#39;MAXFINES&#39;,&#39;LONGOVERDUE&#39;) OR circ.stop_fines IS NULL)
+            AND cp.circ_modifier IN (SELECT circ_mod FROM config.circ_matrix_circ_mod_test_map WHERE circ_mod_test = out_by_circ_mod.id);
+        IF items_out &gt;= out_by_circ_mod.items_out THEN
+            result.fail_part := &#39;config.circ_matrix_circ_mod_test&#39;;
+            result.success := FALSE;
+            done := TRUE;
+            RETURN NEXT result;
+        END IF;
+    END LOOP;
+
+    -- If we passed everything, return the successful matchpoint id
+    IF NOT done THEN
+        RETURN NEXT result;
+    END IF;
+
+    RETURN;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.item-user-renew-test-integer-bigint-integer">item_user_renew_test(integer, bigint, integer)</a>
+		</h2>
+<h3>Returns: SET OF matrix_test_result</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT * FROM action.item_user_circ_test( $1, $2, $3, TRUE );
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#action.schema">action</a>.<a name="action.function.survey-response-answer-date-fixup">survey_response_answer_date_fixup()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	NEW.answer_date := NOW();
+	RETURN NEW;
+END;
+</pre>
+	
+
+<!-- action_triggeraction_trigger -->
+
+		
+		<hr>
+		<h1>Schema action_trigger</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.cleanup">cleanup</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.cleanup Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>module</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-definition">action_trigger.event_definition</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.collector">collector</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.collector Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>module</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.environment">action_trigger.environment</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.environment">environment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.environment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#action-trigger.table.event-definition">action_trigger.event_definition.id</a>
+                  
+                
+                </td>
+            	<td>event_def</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>path</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.collector">action_trigger.collector.module</a>
+                  
+                
+                </td>
+            	<td>collector</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>action_trigger.environment Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>environment_label_check</td>
+                <td>CHECK ((label &lt;&gt; ALL (ARRAY[&#39;result&#39;::text, &#39;target&#39;::text, &#39;event&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.event">event</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.event Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.event-definition">action_trigger.event_definition.id</a>
+                  
+                
+                </td>
+            	<td>event_def</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>add_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>run_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>start_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>update_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>complete_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>update_process</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;pending&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.event-output">action_trigger.event_output.id</a>
+                  
+                
+                </td>
+            	<td>template_output</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.event-output">action_trigger.event_output.id</a>
+                  
+                
+                </td>
+            	<td>error_output</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>action_trigger.event Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>event_state_check</td>
+                <td>CHECK ((state = ANY (ARRAY[&#39;pending&#39;::text, &#39;invalid&#39;::text, &#39;found&#39;::text, &#39;collecting&#39;::text, &#39;collected&#39;::text, &#39;validating&#39;::text, &#39;valid&#39;::text, &#39;reacting&#39;::text, &#39;reacted&#39;::text, &#39;cleaning&#39;::text, &#39;complete&#39;::text, &#39;error&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.event-definition">event_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.event_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#2
+                    
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#2
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#action-trigger.table.hook">action_trigger.hook.key</a>
+                  
+                
+                </td>
+            	<td>hook</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#action-trigger.table.validator">action_trigger.validator.module</a>
+                  
+                
+                </td>
+            	<td>validator</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#action-trigger.table.reactor">action_trigger.reactor.module</a>
+                  
+                
+                </td>
+            	<td>reactor</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.cleanup">action_trigger.cleanup.module</a>
+                  
+                
+                </td>
+            	<td>cleanup_success</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.cleanup">action_trigger.cleanup.module</a>
+                  
+                
+                </td>
+            	<td>cleanup_failure</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>delay</td>
+            	<td>interval</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;00:05:00&#39;::interval
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>delay_field</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>group_field</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>template</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.environment">action_trigger.environment</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event">action_trigger.event</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-params">action_trigger.event_params</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.event-output">event_output</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.event_output Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>is_error</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>data</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event">action_trigger.event</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.event-params">event_params</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.event_params Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#action-trigger.table.event-definition">action_trigger.event_definition.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>event_def</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>param</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.hook">hook</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.hook Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>key</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>core_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>passive</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-definition">action_trigger.event_definition</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.reactor">reactor</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.reactor Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>module</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-definition">action_trigger.event_definition</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#action-trigger.schema">action_trigger</a>.<a name="action-trigger.table.validator">validator</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>action_trigger.validator Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>module</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-definition">action_trigger.event_definition</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#action-trigger.schema">Schema action_trigger</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- actoractor -->
+
+		
+		<hr>
+		<h1>Schema actor</h1>
+		
+			<p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander <mrylander at gmail.com>
+ *
+ * Schema: actor
+ *
+ * Holds all tables pertaining to users and libraries (org units).
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.card">card</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Library Cards
+ *
+ * Each User has one or more library cards.  The current &quot;main&quot;
+ * card is linked to here from the actor.usr table, and it is up
+ * to the consortium policy whether more than one card can be
+ * active for any one user at a given time.
+ *
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.card Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_card_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.hours-of-operation">hours_of_operation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.hours_of_operation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_0_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_0_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_1_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_1_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_2_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_2_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_3_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_3_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_4_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_4_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_5_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_5_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dow_6_open</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;09:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dow_6_close</td>
+            	<td>time without time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;17:00:00&#39;::time without time zone
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-address">org_address</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_address Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;MAILING&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit">actor.org_unit</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       actor_org_address_org_unit_idx org_unit
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-lasso">org_lasso</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_lasso Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.org-lasso-map">actor.org_lasso_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-lasso-map">org_lasso_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_lasso_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-lasso">actor.org_lasso.id</a>
+                  
+                
+                </td>
+            	<td>lasso</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       ou_lasso_org_unit_idx org_unit
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-unit">org_unit</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_unit Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>parent_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit-type">actor.org_unit_type.id</a>
+                  
+                
+                </td>
+            	<td>ou_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-address">actor.org_address.id</a>
+                  
+                
+                </td>
+            	<td>ill_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-address">actor.org_address.id</a>
+                  
+                
+                </td>
+            	<td>holds_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-address">actor.org_address.id</a>
+                  
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-address">actor.org_address.id</a>
+                  
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>shortname</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.distribution-formula">acq.distribution_formula</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.distribution-formula-entry">acq.distribution_formula_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund">acq.fund</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.fund-tag">acq.fund_tag</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.funding-source">acq.funding_source</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.picklist">acq.picklist</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.provider">acq.provider</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.purchase-order">acq.purchase_order</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.circulation">action.circulation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-request">action.hold_request</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.in-house-use">action.in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.non-cat-in-house-use">action.non_cat_in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.non-cataloged-circulation">action.non_cataloged_circulation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.survey">action.survey</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.transit-copy">action.transit_copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action-trigger.table.event-definition">action_trigger.event_definition</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.hours-of-operation">actor.hours_of_operation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-address">actor.org_address</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-lasso-map">actor.org_lasso_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit">actor.org_unit</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit-closed">actor.org_unit_closed</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit-setting">actor.org_unit_setting</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.stat-cat">actor.stat_cat</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.stat-cat-entry">actor.stat_cat_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-org-unit-opt-in">actor.usr_org_unit_opt_in</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-standing-penalty">actor.usr_standing_penalty</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.workstation">actor.workstation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.call-number">asset.call_number</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy-location">asset.copy_location</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy-transparency">asset.copy_transparency</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat">asset.stat_cat</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat-entry">asset.stat_cat_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.billing-type">config.billing_type</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.idl-field-doc">config.idl_field_doc</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#money.table.collections-tracker">money.collections_tracker</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.grp-penalty-threshold">permission.grp_penalty_threshold</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-work-ou-map">permission.usr_work_ou_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.output-folder">reporter.output_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.report-folder">reporter.report_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.template-folder">reporter.template_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.record-entry">serial.record_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.import-bib-trash-fields">vandelay.import_bib_trash_fields</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.import-item-attr-definition">vandelay.import_item_attr_definition</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       actor_org_unit_billing_address_idx billing_address
+    
+       actor_org_unit_holds_address_idx holds_address
+    
+       actor_org_unit_ill_address_idx ill_address
+    
+       actor_org_unit_mailing_address_idx mailing_address
+    
+       actor_org_unit_ou_type_idx ou_type
+    
+       actor_org_unit_parent_ou_idx parent_ou
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-unit-closed">org_unit_closed</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_unit_closed Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>close_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>close_end</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>reason</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-unit-proximity">org_unit_proximity</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_unit_proximity Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>from_org</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>to_org</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>prox</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       from_prox_idx from_org
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-unit-setting">org_unit_setting</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Org Unit settings
+ *
+ * This table contains any arbitrary settings that a client
+ * program would like to save for an org unit.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_unit_setting Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_org_unit_setting_usr_idx org_unit
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.org-unit-type">org_unit_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.org_unit_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>depth</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit-type">actor.org_unit_type.id</a>
+                  
+                
+                </td>
+            	<td>parent</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>can_have_vols</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>can_have_users</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit">actor.org_unit</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.org-unit-type">actor.org_unit_type</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       actor_org_unit_type_parent_idx parent
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.stat-cat">stat_cat</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * User Statistical Catagories
+ *
+ * Local data collected about Users is placed into a Statistical
+ * Catagory.  Here&#39;s where those catagories are defined.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.stat_cat Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.stat-cat-entry">actor.stat_cat_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.stat-cat-entry-usr-map">actor.stat_cat_entry_usr_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.stat-cat-entry">stat_cat_entry</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * User Statistical Catagory Entries
+ *
+ * Local data collected about Users is placed into a Statistical
+ * Catagory.  Each library can create entries into any of its own
+ * stat_cats, its ancestors&#39; stat_cats, or its descendants&#39; stat_cats.
+ *
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.stat_cat_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.stat-cat">actor.stat_cat.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>stat_cat</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.stat-cat-entry-usr-map">stat_cat_entry_usr_map</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Statistical Catagory Entry to User map
+ *
+ * Records the stat_cat entries for each user.
+ *
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.stat_cat_entry_usr_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stat_cat_entry</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.stat-cat">actor.stat_cat.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>stat_cat</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>target_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_stat_cat_entry_usr_idx target_usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr">usr</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * User objects
+ *
+ * This table contains the core User objects that describe both
+ * staff members and patrons.  The difference between the two
+ * types of users is based on the user&#39;s permissions.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>card</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                </td>
+            	<td>profile</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>usrname</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>passwd</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.standing">config.standing.id</a>
+                  
+                
+                </td>
+            	<td>standing</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.identification-type">config.identification_type.id</a>
+                  
+                
+                </td>
+            	<td>ident_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.identification-type">config.identification_type.id</a>
+                  
+                
+                </td>
+            	<td>ident_type2</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_value2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.net-access-level">config.net_access_level.id</a>
+                  
+                
+                </td>
+            	<td>net_access_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>photo_url</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>prefix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>first_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>second_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>family_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>suffix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alias</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>day_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>evening_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>other_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr-address">actor.usr_address.id</a>
+                  
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr-address">actor.usr_address.id</a>
+                  
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dob</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>master_account</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>super_user</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barred</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>juvenile</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usrgroup</td>
+            	<td>serial</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>claims_returned_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>credit_forward_balance</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 0.00
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;none&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>expire_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT (now() + &#39;3 years&#39;::interval)
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.fund-allocation">acq.fund_allocation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem">acq.lineitem</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-note">acq.lineitem_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-usr-attr-definition">acq.lineitem_usr_attr_definition</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.picklist">acq.picklist</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.po-note">acq.po_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.purchase-order">acq.purchase_order</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.circulation">action.circulation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-notification">action.hold_notification</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-request">action.hold_request</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.in-house-use">action.in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.non-cat-in-house-use">action.non_cat_in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.non-cataloged-circulation">action.non_cataloged_circulation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.card">actor.card</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.stat-cat-entry-usr-map">actor.stat_cat_entry_usr_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-address">actor.usr_address</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-note">actor.usr_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-org-unit-opt-in">actor.usr_org_unit_opt_in</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-setting">actor.usr_setting</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-standing-penalty">actor.usr_standing_penalty</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.call-number">asset.call_number</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.call-number-note">asset.call_number_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy-note">asset.copy_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#biblio.table.record-entry">biblio.record_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#biblio.table.record-note">biblio.record_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket">container.biblio_record_entry_bucket</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket">container.call_number_bucket</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket">container.copy_bucket</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket">container.user_bucket</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket-item">container.user_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#money.table.billable-xact">money.billable_xact</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#money.table.collections-tracker">money.collections_tracker</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-grp-map">permission.usr_grp_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-object-perm-map">permission.usr_object_perm_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-perm-map">permission.usr_perm_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-work-ou-map">permission.usr_work_ou_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.output-folder">reporter.output_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.report">reporter.report</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.report-folder">reporter.report_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.schedule">reporter.schedule</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.template">reporter.template</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.template-folder">reporter.template_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.queue">vandelay.queue</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       actor_usr_billing_address_idx billing_address
+    
+       actor_usr_day_phone_idx lower(day_phone)
+    
+       actor_usr_email_idx lower(email)
+    
+       actor_usr_evening_phone_idx lower(evening_phone)
+    
+       actor_usr_family_name_idx lower(family_name)
+    
+       actor_usr_first_given_name_idx lower(first_given_name)
+    
+       actor_usr_home_ou_idx home_ou
+    
+       actor_usr_ident_value2_idx lower(ident_value2)
+    
+       actor_usr_ident_value_idx lower(ident_value)
+    
+       actor_usr_mailing_address_idx mailing_address
+    
+       actor_usr_other_phone_idx lower(other_phone)
+    
+       actor_usr_second_given_name_idx lower(second_given_name)
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr-address">usr_address</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr_address Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>within_city_limits</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;MAILING&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pending</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr-address">actor.usr_address.id</a>
+                  
+                
+                </td>
+            	<td>replaces</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#actor.table.usr-address">actor.usr_address</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       actor_usr_addr_city_idx lower(city)
+    
+       actor_usr_addr_post_code_idx lower(post_code)
+    
+       actor_usr_addr_state_idx lower(state)
+    
+       actor_usr_addr_street1_idx lower(street1)
+    
+       actor_usr_addr_street2_idx lower(street2)
+    
+       actor_usr_addr_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr-note">usr_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_usr_note_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr-org-unit-opt-in">usr_org_unit_opt_in</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr_org_unit_opt_in Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opt_in_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.workstation">actor.workstation.id</a>
+                  
+                
+                </td>
+            	<td>opt_in_ws</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr-setting">usr_setting</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * User settings
+ *
+ * This table contains any arbitrary settings that a client
+ * program would like to save for a user.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr_setting Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_usr_setting_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.usr-standing-penalty">usr_standing_penalty</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005-2008  Equinox Software, Inc. / Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * User standing penalties
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.usr_standing_penalty Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.standing-penalty">config.standing_penalty.id</a>
+                  
+                
+                </td>
+            	<td>standing_penalty</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>set_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       actor_usr_standing_penalty_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#actor.schema">actor</a>.<a name="actor.table.workstation">workstation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>actor.workstation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr-org-unit-opt-in">actor.usr_org_unit_opt_in</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#money.table.bnm-desk-payment">money.bnm_desk_payment</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#actor.schema">Schema actor</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.approve-pending-address-pending-id-integer">approve_pending_address(pending_id integer)</a>
+		</h2>
+<h3>Returns: bigint</h3>
+<h3>Language: PLPGSQL</h3>
+        <p>
+/**
+ * Replaces an address with a pending address.  This is done by giving the pending 
+ * address the ID of the old address.  The replaced address is retained with -id.
+ */
+</p>
+        <pre>
+DECLARE
+    old_id INT;
+BEGIN
+    SELECT INTO old_id replaces FROM actor.usr_address where id = pending_id;
+    IF old_id IS NULL THEN
+        UPDATE actor.usr_address SET pending = &#39;f&#39; WHERE id = pending_id;
+        RETURN pending_id;
+    END IF;
+    -- address replaces an existing address
+    DELETE FROM actor.usr_address WHERE id = -old_id;
+    UPDATE actor.usr_address SET id = -id WHERE id = old_id;
+    UPDATE actor.usr_address SET replaces = NULL, id = old_id, pending = &#39;f&#39; WHERE id = pending_id;
+    RETURN old_id;
+END
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.calculate-system-penalties-context-org-integer-match-user-integer">calculate_system_penalties(context_org integer, match_user integer)</a>
+		</h2>
+<h3>Returns: SET OF usr_standing_penalty</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    user_object         actor.usr%ROWTYPE;
+    new_sp_row          actor.usr_standing_penalty%ROWTYPE;
+    existing_sp_row     actor.usr_standing_penalty%ROWTYPE;
+    collections_fines   permission.grp_penalty_threshold%ROWTYPE;
+    max_fines           permission.grp_penalty_threshold%ROWTYPE;
+    max_overdue         permission.grp_penalty_threshold%ROWTYPE;
+    max_items_out       permission.grp_penalty_threshold%ROWTYPE;
+    tmp_grp             INT;
+    items_overdue       INT;
+    items_out           INT;
+    context_org_list    INT[];
+    current_fines        NUMERIC(8,2) := 0.0;
+    tmp_fines            NUMERIC(8,2);
+    tmp_groc            RECORD;
+    tmp_circ            RECORD;
+    tmp_org             actor.org_unit%ROWTYPE;
+BEGIN
+    SELECT INTO user_object * FROM actor.usr WHERE id = match_user;
+
+    -- Max fines
+    SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+    -- Fail if the user has a high fine balance
+    LOOP
+        tmp_grp := user_object.profile;
+        LOOP
+            SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 1 AND org_unit = tmp_org.id;
+
+            IF max_fines.threshold IS NULL THEN
+                SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+            ELSE
+                EXIT;
+            END IF;
+
+            IF tmp_grp IS NULL THEN
+                EXIT;
+            END IF;
+        END LOOP;
+
+        IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+            EXIT;
+        END IF;
+
+        SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+    END LOOP;
+
+    IF max_fines.threshold IS NOT NULL THEN
+
+        FOR existing_sp_row IN
+                SELECT  *
+                  FROM  actor.usr_standing_penalty
+                  WHERE usr = match_user
+                        AND org_unit = max_fines.org_unit
+                        AND (stop_date IS NULL or stop_date &gt; NOW())
+                        AND standing_penalty = 1
+                LOOP
+            RETURN NEXT existing_sp_row;
+        END LOOP;
+
+        SELECT  SUM(f.balance_owed) INTO current_fines
+          FROM  money.materialized_billable_xact_summary f
+                JOIN (
+                    SELECT  g.id
+                      FROM  money.grocery g
+                            JOIN  actor.org_unit_full_path( max_fines.org_unit ) fp ON (g.billing_location = fp.id)
+                      WHERE usr = match_user
+                            AND xact_finish IS NULL
+                                UNION ALL
+                    SELECT  circ.id
+                      FROM  action.circulation circ
+                            JOIN  actor.org_unit_full_path( max_fines.org_unit ) fp ON (circ.circ_lib = fp.id)
+                      WHERE usr = match_user
+                            AND xact_finish IS NULL ) l USING (id);
+
+        IF current_fines &gt;= max_fines.threshold THEN
+            new_sp_row.usr := match_user;
+            new_sp_row.org_unit := max_fines.org_unit;
+            new_sp_row.standing_penalty := 1;
+            RETURN NEXT new_sp_row;
+        END IF;
+    END IF;
+
+    -- Start over for max overdue
+    SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+    -- Fail if the user has too many overdue items
+    LOOP
+        tmp_grp := user_object.profile;
+        LOOP
+
+            SELECT * INTO max_overdue FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 2 AND org_unit = tmp_org.id;
+
+            IF max_overdue.threshold IS NULL THEN
+                SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+            ELSE
+                EXIT;
+            END IF;
+
+            IF tmp_grp IS NULL THEN
+                EXIT;
+            END IF;
+        END LOOP;
+
+        IF max_overdue.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+            EXIT;
+        END IF;
+
+        SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+    END LOOP;
+
+    IF max_overdue.threshold IS NOT NULL THEN
+
+        FOR existing_sp_row IN
+                SELECT  *
+                  FROM  actor.usr_standing_penalty
+                  WHERE usr = match_user
+                        AND org_unit = max_overdue.org_unit
+                        AND (stop_date IS NULL or stop_date &gt; NOW())
+                        AND standing_penalty = 2
+                LOOP
+            RETURN NEXT existing_sp_row;
+        END LOOP;
+
+        SELECT  INTO items_overdue COUNT(*)
+          FROM  action.circulation circ
+                JOIN  actor.org_unit_full_path( max_overdue.org_unit ) fp ON (circ.circ_lib = fp.id)
+          WHERE circ.usr = match_user
+            AND circ.checkin_time IS NULL
+            AND circ.due_date &lt; NOW()
+            AND (circ.stop_fines = &#39;MAXFINES&#39; OR circ.stop_fines IS NULL);
+
+        IF items_overdue &gt;= max_overdue.threshold::INT THEN
+            new_sp_row.usr := match_user;
+            new_sp_row.org_unit := max_overdue.org_unit;
+            new_sp_row.standing_penalty := 2;
+            RETURN NEXT new_sp_row;
+        END IF;
+    END IF;
+
+    -- Start over for max out
+    SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+    -- Fail if the user has too many checked out items
+    LOOP
+        tmp_grp := user_object.profile;
+        LOOP
+            SELECT * INTO max_items_out FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 3 AND org_unit = tmp_org.id;
+
+            IF max_items_out.threshold IS NULL THEN
+                SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+            ELSE
+                EXIT;
+            END IF;
+
+            IF tmp_grp IS NULL THEN
+                EXIT;
+            END IF;
+        END LOOP;
+
+        IF max_items_out.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+            EXIT;
+        END IF;
+
+        SELECT INTO tmp_org * FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+    END LOOP;
+
+
+    -- Fail if the user has too many items checked out
+    IF max_items_out.threshold IS NOT NULL THEN
+
+        FOR existing_sp_row IN
+                SELECT  *
+                  FROM  actor.usr_standing_penalty
+                  WHERE usr = match_user
+                        AND org_unit = max_items_out.org_unit
+                        AND (stop_date IS NULL or stop_date &gt; NOW())
+                        AND standing_penalty = 3
+                LOOP
+            RETURN NEXT existing_sp_row;
+        END LOOP;
+
+        SELECT  INTO items_out COUNT(*)
+          FROM  action.circulation circ
+                JOIN  actor.org_unit_full_path( max_items_out.org_unit ) fp ON (circ.circ_lib = fp.id)
+          WHERE circ.usr = match_user
+                AND circ.checkin_time IS NULL
+                AND (circ.stop_fines IN (&#39;MAXFINES&#39;,&#39;LONGOVERDUE&#39;) OR circ.stop_fines IS NULL);
+
+           IF items_out &gt;= max_items_out.threshold::INT THEN
+            new_sp_row.usr := match_user;
+            new_sp_row.org_unit := max_items_out.org_unit;
+            new_sp_row.standing_penalty := 3;
+            RETURN NEXT new_sp_row;
+           END IF;
+    END IF;
+
+    -- Start over for collections warning
+    SELECT INTO tmp_org * FROM actor.org_unit WHERE id = context_org;
+
+    -- Fail if the user has a collections-level fine balance
+    LOOP
+        tmp_grp := user_object.profile;
+        LOOP
+            SELECT * INTO max_fines FROM permission.grp_penalty_threshold WHERE grp = tmp_grp AND penalty = 4 AND org_unit = tmp_org.id;
+
+            IF max_fines.threshold IS NULL THEN
+                SELECT parent INTO tmp_grp FROM permission.grp_tree WHERE id = tmp_grp;
+            ELSE
+                EXIT;
+            END IF;
+
+            IF tmp_grp IS NULL THEN
+                EXIT;
+            END IF;
+        END LOOP;
+
+        IF max_fines.threshold IS NOT NULL OR tmp_org.parent_ou IS NULL THEN
+            EXIT;
+        END IF;
+
+        SELECT * INTO tmp_org FROM actor.org_unit WHERE id = tmp_org.parent_ou;
+
+    END LOOP;
+
+    IF max_fines.threshold IS NOT NULL THEN
+
+        FOR existing_sp_row IN
+                SELECT  *
+                  FROM  actor.usr_standing_penalty
+                  WHERE usr = match_user
+                        AND org_unit = max_fines.org_unit
+                        AND (stop_date IS NULL or stop_date &gt; NOW())
+                        AND standing_penalty = 4
+                LOOP
+            RETURN NEXT existing_sp_row;
+        END LOOP;
+
+        SELECT  SUM(f.balance_owed) INTO current_fines
+          FROM  money.materialized_billable_xact_summary f
+                JOIN (
+                    SELECT  g.id
+                      FROM  money.grocery g
+                            JOIN  actor.org_unit_full_path( max_fines.org_unit ) fp ON (g.billing_location = fp.id)
+                      WHERE usr = match_user
+                            AND xact_finish IS NULL
+                                UNION ALL
+                    SELECT  circ.id
+                      FROM  action.circulation circ
+                            JOIN  actor.org_unit_full_path( max_fines.org_unit ) fp ON (circ.circ_lib = fp.id)
+                      WHERE usr = match_user
+                            AND xact_finish IS NULL ) l USING (id);
+
+        IF current_fines &gt;= max_fines.threshold THEN
+            new_sp_row.usr := match_user;
+            new_sp_row.org_unit := max_fines.org_unit;
+            new_sp_row.standing_penalty := 4;
+            RETURN NEXT new_sp_row;
+        END IF;
+    END IF;
+
+
+    RETURN;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.crypt-pw-insert">crypt_pw_insert()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+	BEGIN
+		NEW.passwd = MD5( NEW.passwd );
+		RETURN NEW;
+	END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.crypt-pw-update">crypt_pw_update()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+	BEGIN
+		IF NEW.passwd &lt;&gt; OLD.passwd THEN
+			NEW.passwd = MD5( NEW.passwd );
+		END IF;
+		RETURN NEW;
+	END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-ancestor-at-depth-integer-integer">org_unit_ancestor_at_depth(integer, integer)</a>
+		</h2>
+<h3>Returns: org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	a.*
+	  FROM	actor.org_unit a
+	  WHERE	id = ( SELECT FIRST(x.id)
+	  		 FROM	actor.org_unit_ancestors($1) x
+			   	JOIN actor.org_unit_type y
+					ON x.ou_type = y.id AND y.depth = $2);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-ancestor-setting-org-id-text-setting-name-integer">org_unit_ancestor_setting(org_id text, setting_name integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit_setting</h3>
+<h3>Language: PLPGSQL</h3>
+        <p>
+/**
+* Search &quot;up&quot; the org_unit tree until we find the first occurrence of an 
+* org_unit_setting with the given name.
+*/
+</p>
+        <pre>
+DECLARE
+    setting RECORD;
+    cur_org INT;
+BEGIN
+    cur_org := org_id;
+    LOOP
+        SELECT INTO setting * FROM actor.org_unit_setting WHERE org_unit = cur_org AND name = setting_name;
+        IF FOUND THEN
+            RETURN NEXT setting;
+        END IF;
+        SELECT INTO cur_org parent_ou FROM actor.org_unit WHERE id = cur_org;
+        EXIT WHEN cur_org IS NULL;
+    END LOOP;
+    RETURN;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-ancestors-integer">org_unit_ancestors(integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	a.*
+	  FROM	connectby(&#39;actor.org_unit&#39;::text,&#39;parent_ou&#39;::text,&#39;id&#39;::text,&#39;name&#39;::text,$1::text,100,&#39;.&#39;::text)
+	  		AS t(keyid text, parent_keyid text, level int, branch text,pos int)
+		JOIN actor.org_unit a ON a.id::text = t.keyid::text
+        JOIN actor.org_unit_type tp ON tp.id = a.ou_type 
+        ORDER BY tp.depth, a.name;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-combined-ancestors-integer-integer">org_unit_combined_ancestors(integer, integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	*
+	  FROM	actor.org_unit_ancestors($1)
+			UNION
+	SELECT	*
+	  FROM	actor.org_unit_ancestors($2);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-common-ancestors-integer-integer">org_unit_common_ancestors(integer, integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	*
+	  FROM	actor.org_unit_ancestors($1)
+			INTERSECT
+	SELECT	*
+	  FROM	actor.org_unit_ancestors($2);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-descendants-integer">org_unit_descendants(integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	a.*
+	  FROM	connectby(&#39;actor.org_unit&#39;::text,&#39;id&#39;::text,&#39;parent_ou&#39;::text,&#39;name&#39;::text,$1::text,100,&#39;.&#39;::text)
+	  		AS t(keyid text, parent_keyid text, level int, branch text,pos int)
+		JOIN actor.org_unit a ON a.id::text = t.keyid::text
+	  ORDER BY  CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-descendants-integer-integer">org_unit_descendants(integer, integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	a.*
+	  FROM	connectby(&#39;actor.org_unit&#39;::text,&#39;id&#39;::text,&#39;parent_ou&#39;::text,&#39;name&#39;::text,
+	  			(SELECT	x.id
+				   FROM	actor.org_unit_ancestors($1) x
+				   	JOIN actor.org_unit_type y ON x.ou_type = y.id
+				  WHERE	y.depth = $2)::text
+		,100,&#39;.&#39;::text)
+	  		AS t(keyid text, parent_keyid text, level int, branch text,pos int)
+		JOIN actor.org_unit a ON a.id::text = t.keyid::text
+	  ORDER BY  CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-full-path-integer">org_unit_full_path(integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	*
+	  FROM	actor.org_unit_ancestors($1)
+			UNION
+	SELECT	*
+	  FROM	actor.org_unit_descendants($1);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-full-path-integer-integer">org_unit_full_path(integer, integer)</a>
+		</h2>
+<h3>Returns: SET OF org_unit</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	* FROM actor.org_unit_full_path((actor.org_unit_ancestor_at_depth($1, $2)).id)
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.org-unit-proximity-integer-integer">org_unit_proximity(integer, integer)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT COUNT(id)::INT FROM (
+		SELECT id FROM actor.org_unit_combined_ancestors($1, $2)
+			EXCEPT
+		SELECT id FROM actor.org_unit_common_ancestors($1, $2)
+	) z;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.usr-merge-deactivate-cards-integer-del-cards-integer-del-addrs-boolean-dest-usr-boolean-src-usr-boolean">usr_merge(deactivate_cards integer, del_cards integer, del_addrs boolean, dest_usr boolean, src_usr boolean)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: PLPGSQL</h3>
+        <p>
+/**
+ * Merges all user date from src_usr to dest_usr.  When collisions occur, 
+ * keep dest_usr&#39;s data and delete src_usr&#39;s data.
+ */
+</p>
+        <pre>
+BEGIN
+
+    -- do some initial cleanup 
+    UPDATE actor.usr SET card = NULL WHERE id = src_usr;
+    UPDATE actor.usr SET mailing_address = NULL WHERE id = src_usr;
+    UPDATE actor.usr SET billing_address = NULL WHERE id = src_usr;
+
+    -- actor.*
+    IF del_cards THEN
+        DELETE FROM actor.card where usr = src_usr;
+    ELSE
+        IF deactivate_cards THEN
+            UPDATE actor.card SET active = &#39;f&#39; WHERE usr = src_usr;
+        END IF;
+        UPDATE actor.card SET usr = dest_usr WHERE usr = src_usr;
+    END IF;
+
+
+    IF del_addrs THEN
+        DELETE FROM actor.usr_address WHERE usr = src_usr;
+    ELSE
+        UPDATE actor.usr_address SET usr = dest_usr WHERE usr = src_usr;
+    END IF;
+
+    UPDATE actor.usr_note SET usr = dest_usr WHERE usr = src_usr;
+    -- dupes are technically OK in actor.usr_standing_penalty, should manually delete them...
+    UPDATE actor.usr_standing_penalty SET usr = dest_usr WHERE usr = src_usr;
+    PERFORM actor.usr_merge_rows(&#39;actor.usr_org_unit_opt_in&#39;, &#39;usr&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;actor.usr_setting&#39;, &#39;usr&#39;, src_usr, dest_usr);
+
+    -- permission.*
+    PERFORM actor.usr_merge_rows(&#39;permission.usr_perm_map&#39;, &#39;usr&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;permission.usr_object_perm_map&#39;, &#39;usr&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;permission.usr_grp_map&#39;, &#39;usr&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;permission.usr_work_ou_map&#39;, &#39;usr&#39;, src_usr, dest_usr);
+
+
+    -- container.*
+    PERFORM actor.usr_merge_rows(&#39;container.biblio_record_entry_bucket&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;container.call_number_bucket&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;container.copy_bucket&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;container.user_bucket&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;container.user_bucket_item&#39;, &#39;target_user&#39;, src_usr, dest_usr);
+
+    -- vandelay.*
+    PERFORM actor.usr_merge_rows(&#39;vandelay.queue&#39;, &#39;owner&#39;, src_usr, dest_usr);
+
+    -- money.*
+    PERFORM actor.usr_merge_rows(&#39;money.collections_tracker&#39;, &#39;usr&#39;, src_usr, dest_usr);
+    PERFORM actor.usr_merge_rows(&#39;money.collections_tracker&#39;, &#39;collector&#39;, src_usr, dest_usr);
+    UPDATE money.billable_xact SET usr = dest_usr WHERE usr = src_usr;
+    UPDATE money.billing SET voider = dest_usr WHERE voider = src_usr;
+    UPDATE money.bnm_payment SET accepting_usr = dest_usr WHERE accepting_usr = src_usr;
+
+    -- action.*
+    UPDATE action.circulation SET usr = dest_usr WHERE usr = src_usr;
+    UPDATE action.circulation SET circ_staff = dest_usr WHERE circ_staff = src_usr;
+    UPDATE action.circulation SET checkin_staff = dest_usr WHERE checkin_staff = src_usr;
+
+    UPDATE action.hold_request SET usr = dest_usr WHERE usr = src_usr;
+    UPDATE action.hold_request SET fulfillment_staff = dest_usr WHERE fulfillment_staff = src_usr;
+    UPDATE action.hold_request SET requestor = dest_usr WHERE requestor = src_usr;
+    UPDATE action.hold_notification SET notify_staff = dest_usr WHERE notify_staff = src_usr;
+
+    UPDATE action.in_house_use SET staff = dest_usr WHERE staff = src_usr;
+    UPDATE action.non_cataloged_circulation SET staff = dest_usr WHERE staff = src_usr;
+    UPDATE action.non_cataloged_circulation SET patron = dest_usr WHERE patron = src_usr;
+    UPDATE action.non_cat_in_house_use SET staff = dest_usr WHERE staff = src_usr;
+    UPDATE action.survey_response SET usr = dest_usr WHERE usr = src_usr;
+
+    -- acq.*
+    UPDATE acq.fund_allocation SET allocator = dest_usr WHERE allocator = src_usr;
+    PERFORM actor.usr_merge_rows(&#39;acq.picklist&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    UPDATE acq.purchase_order SET owner = dest_usr WHERE owner = src_usr;
+    UPDATE acq.po_note SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE acq.po_note SET editor = dest_usr WHERE editor = src_usr;
+    UPDATE acq.lineitem_note SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE acq.lineitem_note SET editor = dest_usr WHERE editor = src_usr;
+    UPDATE acq.lineitem_usr_attr_definition SET usr = dest_usr WHERE usr = src_usr;
+
+    -- asset.*
+    UPDATE asset.copy SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE asset.copy SET editor = dest_usr WHERE editor = src_usr;
+    UPDATE asset.copy_note SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE asset.call_number SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE asset.call_number SET editor = dest_usr WHERE editor = src_usr;
+    UPDATE asset.call_number_note SET creator = dest_usr WHERE creator = src_usr;
+
+    -- serial.*
+    UPDATE serial.record_entry SET creator = dest_usr WHERE creator = src_usr;
+    UPDATE serial.record_entry SET editor = dest_usr WHERE editor = src_usr;
+
+    -- reporter.*
+    -- It&#39;s not uncommon to define the reporter schema in a replica 
+    -- DB only, so don&#39;t assume these tables exist in the write DB.
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.template&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.report&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.schedule&#39;, &#39;runner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.template_folder&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.report_folder&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+    BEGIN
+        PERFORM actor.usr_merge_rows(&#39;reporter.output_folder&#39;, &#39;owner&#39;, src_usr, dest_usr);
+    EXCEPTION WHEN undefined_table THEN
+        -- do nothing
+    END;
+
+    -- Finally, delete the source user
+    DELETE FROM actor.usr WHERE id = src_usr;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#actor.schema">actor</a>.<a name="actor.function.usr-merge-rows-dest-usr-text-src-usr-text-col-name-integer-table-name-integer">usr_merge_rows(dest_usr text, src_usr text, col_name integer, table_name integer)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: PLPGSQL</h3>
+        <p>
+/**
+ * Attempts to move each row of the specified table from src_user to dest_user.  
+ * Where conflicts exist, the conflicting &quot;source&quot; row is deleted.
+ */
+</p>
+        <pre>
+DECLARE
+    sel TEXT;
+    upd TEXT;
+    del TEXT;
+    cur_row RECORD;
+BEGIN
+    sel := &#39;SELECT id::BIGINT FROM &#39; || table_name || &#39; WHERE &#39; || quote_ident(col_name) || &#39; = &#39; || quote_literal(src_usr);
+    upd := &#39;UPDATE &#39; || table_name || &#39; SET &#39; || quote_ident(col_name) || &#39; = &#39; || quote_literal(dest_usr) || &#39; WHERE id = &#39;;
+    del := &#39;DELETE FROM &#39; || table_name || &#39; WHERE id = &#39;;
+    FOR cur_row IN EXECUTE sel LOOP
+        BEGIN
+            --RAISE NOTICE &#39;Attempting to merge % %&#39;, table_name, cur_row.id;
+            EXECUTE upd || cur_row.id;
+        EXCEPTION WHEN unique_violation THEN
+            --RAISE NOTICE &#39;Deleting conflicting % %&#39;, table_name, cur_row.id;
+            EXECUTE del || cur_row.id;
+        END;
+    END LOOP;
+END;
+</pre>
+	
+
+<!-- assetasset -->
+
+		
+		<hr>
+		<h1>Schema asset</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.call-number">call_number</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.call_number Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#asset.table.call-number-note">asset.call_number_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.uri-call-number-map">asset.uri_call_number_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket-item">container.call_number_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.subscription">serial.subscription</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       asset_call_number_creator_idx creator
+    
+       asset_call_number_dewey_idx call_number_dewey(label)
+    
+       asset_call_number_editor_idx editor
+    
+       asset_call_number_record_idx record
+    
+       asset_call_number_upper_label_id_owning_lib_idx upper(label), id, owning_lib
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.call-number-note">call_number_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.call_number_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.call-number">asset.call_number.id</a>
+                  
+                
+                </td>
+            	<td>call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.copy">copy</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.copy Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.call-number">asset.call_number.id</a>
+                  
+                
+                </td>
+            	<td>call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.copy-status">config.copy_status.id</a>
+                  
+                
+                </td>
+            	<td>status</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy-location">asset.copy_location.id</a>
+                  
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>loan_duration</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fine_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>age_protect</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 0.00
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-modifier">config.circ_modifier.code</a>
+                  
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dummy_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dummy_author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>asset.copy Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>copy_fine_level_check</td>
+                <td>CHECK ((fine_level = ANY (ARRAY[1, 2, 3])))</td>
+            </tr>
+			
+            <tr class="tr1">
+				<td>copy_loan_duration_check</td>
+                <td>CHECK ((loan_duration = ANY (ARRAY[1, 2, 3])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.circulation">action.circulation</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-copy-map">action.hold_copy_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-request">action.hold_request</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.hold-transit-copy">action.hold_transit_copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.in-house-use">action.in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.transit-copy">action.transit_copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy-note">asset.copy_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy-transparency-map">asset.copy_transparency_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat-entry-copy-map">asset.stat_cat_entry_copy_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket-item">container.copy_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#extend-reporter.table.legacy-circ-count">extend_reporter.legacy_circ_count</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.issuance">serial.issuance</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       cp_avail_cn_idx call_number
+    
+       cp_cn_idx call_number
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.copy-location">copy_location</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.copy_location Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>hold_verify</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.distribution-formula-entry">acq.distribution_formula_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.issuance">serial.issuance</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.copy-note">copy_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.copy_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>owning_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.copy-transparency">copy_transparency</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.copy_transparency Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>loan_duration</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fine_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>asset.copy_transparency Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>copy_transparency_fine_level_check</td>
+                <td>CHECK ((fine_level = ANY (ARRAY[1, 2, 3])))</td>
+            </tr>
+			
+            <tr class="tr1">
+				<td>copy_transparency_loan_duration_check</td>
+                <td>CHECK ((loan_duration = ANY (ARRAY[1, 2, 3])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#asset.table.copy-transparency-map">asset.copy_transparency_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.copy-transparency-map">copy_transparency_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.copy_transparency_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy-transparency">asset.copy_transparency.id</a>
+                  
+                
+                </td>
+            	<td>transparency</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       cp_tr_cp_idx transparency
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.stat-cat">stat_cat</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.stat_cat Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat-entry">asset.stat_cat_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat-entry-copy-map">asset.stat_cat_entry_copy_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.stat-cat-entry">stat_cat_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.stat_cat_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.stat-cat">asset.stat_cat.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>stat_cat</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#asset.table.stat-cat-entry-copy-map">asset.stat_cat_entry_copy_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.stat-cat-entry-copy-map">stat_cat_entry_copy_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.stat_cat_entry_copy_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.stat-cat">asset.stat_cat.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>stat_cat</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.stat-cat-entry">asset.stat_cat_entry.id</a>
+                  
+                
+                </td>
+            	<td>stat_cat_entry</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owning_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.stat-cat-entry-transparency-map">stat_cat_entry_transparency_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.stat_cat_entry_transparency_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>stat_cat</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stat_cat_entry</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>owning_transparency</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.uri">uri</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.uri Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>href</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>use_restriction</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#asset.table.uri-call-number-map">asset.uri_call_number_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.subscription">serial.subscription</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#asset.schema">asset</a>.<a name="asset.table.uri-call-number-map">uri_call_number_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>asset.uri_call_number_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.uri">asset.uri.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>uri</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.call-number">asset.call_number.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>call_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       asset_uri_call_number_map_cn_idx call_number
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#asset.schema">Schema asset</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#asset.schema">asset</a>.<a name="asset.function.merge-record-assets-source-record-bigint-target-record-bigint">merge_record_assets(source_record bigint, target_record bigint)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	moved_objects INT := 0;
+	source_cn     asset.call_number%ROWTYPE;
+	target_cn     asset.call_number%ROWTYPE;
+	metarec       metabib.metarecord%ROWTYPE;
+	hold          action.hold_request%ROWTYPE;
+	ser_rec       serial.record_entry%ROWTYPE;
+    uri_count     INT := 0;
+    counter       INT := 0;
+    uri_datafield TEXT;
+    uri_text      TEXT := &#39;&#39;;
+BEGIN
+
+    -- move any 856 entries on records that have at least one MARC-mapped URI entry
+    SELECT  INTO uri_count COUNT(*)
+      FROM  asset.uri_call_number_map m
+            JOIN asset.call_number cn ON (m.call_number = cn.id)
+      WHERE cn.record = source_record;
+
+    IF uri_count &gt; 0 THEN
+        
+        SELECT  COUNT(*) INTO counter
+          FROM  xpath_table(
+                    &#39;id&#39;,
+                    &#39;marc&#39;,
+                    &#39;acq.lineitem&#39;,
+                    &#39;//*[@tag=&quot;856&quot;]&#39;,
+                    &#39;id=&#39; || lineitem
+                ) as t(i int,c text);
+    
+        FOR i IN 1 .. counter LOOP
+            SELECT  &#39;&lt;datafield xmlns=&quot;http://www.loc.gov/MARC21/slim&quot; tag=&quot;856&quot;&gt;&#39; ||
+                        array_to_string(
+                            array_accum(
+                                &#39;&lt;subfield code=&quot;&#39; || subfield || &#39;&quot;&gt;&#39; ||
+                                regexp_replace(
+                                    regexp_replace(
+                                        regexp_replace(data,&#39;&amp;&#39;,&#39;&amp;amp;&#39;,&#39;g&#39;),
+                                        &#39;&gt;&#39;, &#39;&amp;gt;&#39;, &#39;g&#39;
+                                    ),
+                                    &#39;&lt;&#39;, &#39;&amp;lt;&#39;, &#39;g&#39;
+                                ) || &#39;&lt;/subfield&gt;&#39;
+                            ), &#39;&#39;
+                        ) || &#39;&lt;/datafield&gt;&#39; INTO uri_datafield
+              FROM  xpath_table(
+                        &#39;id&#39;,
+                        &#39;marc&#39;,
+                        &#39;biblio.record_entry&#39;,
+                        &#39;//*[@tag=&quot;856&quot;][position()=&#39; || i || &#39;]/*/@code|&#39; ||
+                        &#39;//*[@tag=&quot;856&quot;][position()=&#39; || i || &#39;]/*[@code]&#39;,
+                        &#39;id=&#39; || source_record
+                    ) as t(id int,subfield text,data text);
+
+            uri_text := uri_text || uri_datafield;
+        END LOOP;
+
+        IF uri_text &lt;&gt; &#39;&#39; THEN
+            UPDATE  biblio.record_entry
+              SET   marc = regexp_replace(marc,&#39;(&lt;/[^&gt;]*record&gt;)&#39;, uri_text || E&#39;\\1&#39;)
+              WHERE id = target_record;
+        END IF;
+
+    END IF;
+
+	-- Find and move metarecords to the target record
+	SELECT	INTO metarec *
+	  FROM	metabib.metarecord
+	  WHERE	master_record = source_record;
+
+	IF FOUND THEN
+		UPDATE	metabib.metarecord
+		  SET	master_record = target_record,
+			mods = NULL
+		  WHERE	id = metarec.id;
+
+		moved_objects := moved_objects + 1;
+	END IF;
+
+	-- Find call numbers attached to the source ...
+	FOR source_cn IN SELECT * FROM asset.call_number WHERE record = source_record LOOP
+
+		SELECT	INTO target_cn *
+		  FROM	asset.call_number
+		  WHERE	label = source_cn.label
+			AND owning_lib = source_cn.owning_lib
+			AND record = target_record;
+
+		-- ... and if there&#39;s a conflicting one on the target ...
+		IF FOUND THEN
+
+			-- ... move the copies to that, and ...
+			UPDATE	asset.copy
+			  SET	call_number = target_cn.id
+			  WHERE	call_number = source_cn.id;
+
+			-- ... move V holds to the move-target call number
+			FOR hold IN SELECT * FROM action.hold_request WHERE target = source_cn.id AND hold_type = &#39;V&#39; LOOP
+		
+				UPDATE	action.hold_request
+				  SET	target = target_cn.id
+				  WHERE	id = hold.id;
+		
+				moved_objects := moved_objects + 1;
+			END LOOP;
+
+		-- ... if not ...
+		ELSE
+			-- ... just move the call number to the target record
+			UPDATE	asset.call_number
+			  SET	record = target_record
+			  WHERE	id = source_cn.id;
+		END IF;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find T holds targeting the source record ...
+	FOR hold IN SELECT * FROM action.hold_request WHERE target = source_record AND hold_type = &#39;T&#39; LOOP
+
+		-- ... and move them to the target record
+		UPDATE	action.hold_request
+		  SET	target = target_record
+		  WHERE	id = hold.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+	-- Find serial records targeting the source record ...
+	FOR ser_rec IN SELECT * FROM serial.record_entry WHERE record = source_record LOOP
+		-- ... and move them to the target record
+		UPDATE	serial.record_entry
+		  SET	record = target_record
+		  WHERE	id = ser_rec.id;
+
+		moved_objects := moved_objects + 1;
+	END LOOP;
+
+    -- Finally, &quot;delete&quot; the source record
+    DELETE FROM biblio.record_entry WHERE id = source_record;
+
+	-- That&#39;s all, folks!
+	RETURN moved_objects;
+END;
+</pre>
+	
+
+<!-- auditorauditor -->
+
+		
+		<hr>
+		<h1>Schema auditor</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.actor-org-unit-history">actor_org_unit_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_org_unit_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>parent_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ou_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ill_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holds_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>shortname</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.actor-org-unit-lifecycle">actor_org_unit_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_org_unit_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>parent_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ou_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ill_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holds_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>shortname</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, org_unit.id
+, org_unit.parent_ou
+, org_unit.ou_type
+, org_unit.ill_address
+, org_unit.holds_address
+, org_unit.mailing_address
+, org_unit.billing_address
+, org_unit.shortname
+, org_unit.name
+, org_unit.email
+, org_unit.phone
+, org_unit.opac_visible 
+FROM actor.org_unit 
+UNION ALLSELECT actor_org_unit_history.audit_id AS &quot;?column?&quot;
+, actor_org_unit_history.audit_time
+, actor_org_unit_history.audit_action
+, actor_org_unit_history.id
+, actor_org_unit_history.parent_ou
+, actor_org_unit_history.ou_type
+, actor_org_unit_history.ill_address
+, actor_org_unit_history.holds_address
+, actor_org_unit_history.mailing_address
+, actor_org_unit_history.billing_address
+, actor_org_unit_history.shortname
+, actor_org_unit_history.name
+, actor_org_unit_history.email
+, actor_org_unit_history.phone
+, actor_org_unit_history.opac_visible 
+FROM auditor.actor_org_unit_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.actor-usr-address-history">actor_usr_address_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_usr_address_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>within_city_limits</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pending</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>replaces</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.actor-usr-address-lifecycle">actor_usr_address_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_usr_address_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>valid</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>within_city_limits</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>address_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>street1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>street2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>city</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>county</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>state</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>country</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>post_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pending</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>replaces</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, usr_address.id
+, usr_address.valid
+, usr_address.within_city_limits
+, usr_address.address_type
+, usr_address.usr
+, usr_address.street1
+, usr_address.street2
+, usr_address.city
+, usr_address.county
+, usr_address.state
+, usr_address.country
+, usr_address.post_code
+, usr_address.pending
+, usr_address.replaces 
+FROM actor.usr_address 
+UNION ALLSELECT actor_usr_address_history.audit_id AS &quot;?column?&quot;
+, actor_usr_address_history.audit_time
+, actor_usr_address_history.audit_action
+, actor_usr_address_history.id
+, actor_usr_address_history.valid
+, actor_usr_address_history.within_city_limits
+, actor_usr_address_history.address_type
+, actor_usr_address_history.usr
+, actor_usr_address_history.street1
+, actor_usr_address_history.street2
+, actor_usr_address_history.city
+, actor_usr_address_history.county
+, actor_usr_address_history.state
+, actor_usr_address_history.country
+, actor_usr_address_history.post_code
+, actor_usr_address_history.pending
+, actor_usr_address_history.replaces 
+FROM auditor.actor_usr_address_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.actor-usr-history">actor_usr_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_usr_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>card</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>profile</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usrname</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>passwd</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>standing</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_type2</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident_value2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>net_access_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>photo_url</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>prefix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>first_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>second_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>family_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>suffix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alias</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>day_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>evening_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>other_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dob</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>master_account</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>super_user</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>barred</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>juvenile</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usrgroup</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>claims_returned_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>credit_forward_balance</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>expire_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.actor-usr-lifecycle">actor_usr_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.actor_usr_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>card</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>profile</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usrname</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>passwd</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>standing</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_type</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ident_type2</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident_value2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>net_access_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>photo_url</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>prefix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>first_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>second_given_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>family_name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>suffix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alias</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>day_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>evening_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>other_phone</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>mailing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>billing_address</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dob</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>master_account</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>super_user</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>barred</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>juvenile</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usrgroup</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>claims_returned_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>credit_forward_balance</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>expire_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, usr.id
+, usr.card
+, usr.profile
+, usr.usrname
+, usr.email
+, usr.passwd
+, usr.standing
+, usr.ident_type
+, usr.ident_value
+, usr.ident_type2
+, usr.ident_value2
+, usr.net_access_level
+, usr.photo_url
+, usr.prefix
+, usr.first_given_name
+, usr.second_given_name
+, usr.family_name
+, usr.suffix
+, usr.alias
+, usr.day_phone
+, usr.evening_phone
+, usr.other_phone
+, usr.mailing_address
+, usr.billing_address
+, usr.home_ou
+, usr.dob
+, usr.active
+, usr.master_account
+, usr.super_user
+, usr.barred
+, usr.deleted
+, usr.juvenile
+, usr.usrgroup
+, usr.claims_returned_count
+, usr.credit_forward_balance
+, usr.last_xact_id
+, usr.alert_message
+, usr.create_date
+, usr.expire_date 
+FROM actor.usr 
+UNION ALLSELECT actor_usr_history.audit_id AS &quot;?column?&quot;
+, actor_usr_history.audit_time
+, actor_usr_history.audit_action
+, actor_usr_history.id
+, actor_usr_history.card
+, actor_usr_history.profile
+, actor_usr_history.usrname
+, actor_usr_history.email
+, actor_usr_history.passwd
+, actor_usr_history.standing
+, actor_usr_history.ident_type
+, actor_usr_history.ident_value
+, actor_usr_history.ident_type2
+, actor_usr_history.ident_value2
+, actor_usr_history.net_access_level
+, actor_usr_history.photo_url
+, actor_usr_history.prefix
+, actor_usr_history.first_given_name
+, actor_usr_history.second_given_name
+, actor_usr_history.family_name
+, actor_usr_history.suffix
+, actor_usr_history.alias
+, actor_usr_history.day_phone
+, actor_usr_history.evening_phone
+, actor_usr_history.other_phone
+, actor_usr_history.mailing_address
+, actor_usr_history.billing_address
+, actor_usr_history.home_ou
+, actor_usr_history.dob
+, actor_usr_history.active
+, actor_usr_history.master_account
+, actor_usr_history.super_user
+, actor_usr_history.barred
+, actor_usr_history.deleted
+, actor_usr_history.juvenile
+, actor_usr_history.usrgroup
+, actor_usr_history.claims_returned_count
+, actor_usr_history.credit_forward_balance
+, actor_usr_history.last_xact_id
+, actor_usr_history.alert_message
+, actor_usr_history.create_date
+, actor_usr_history.expire_date 
+FROM auditor.actor_usr_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.asset-call-number-history">asset_call_number_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.asset_call_number_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.asset-call-number-lifecycle">asset_call_number_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.asset_call_number_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, call_number.id
+, call_number.creator
+, call_number.create_date
+, call_number.editor
+, call_number.edit_date
+, call_number.record
+, call_number.owning_lib
+, call_number.label
+, call_number.deleted 
+FROM asset.call_number 
+UNION ALLSELECT asset_call_number_history.audit_id AS &quot;?column?&quot;
+, asset_call_number_history.audit_time
+, asset_call_number_history.audit_action
+, asset_call_number_history.id
+, asset_call_number_history.creator
+, asset_call_number_history.create_date
+, asset_call_number_history.editor
+, asset_call_number_history.edit_date
+, asset_call_number_history.record
+, asset_call_number_history.owning_lib
+, asset_call_number_history.label
+, asset_call_number_history.deleted 
+FROM auditor.asset_call_number_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.asset-copy-history">asset_copy_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.asset_copy_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>status</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>loan_duration</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>age_protect</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dummy_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dummy_author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.asset-copy-lifecycle">asset_copy_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.asset_copy_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>status</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>loan_duration</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>age_protect</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dummy_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dummy_author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, copy.id
+, copy.circ_lib
+, copy.creator
+, copy.call_number
+, copy.editor
+, copy.create_date
+, copy.edit_date
+, copy.copy_number
+, copy.status
+, copy.location
+, copy.loan_duration
+, copy.fine_level
+, copy.age_protect
+, copy.circulate
+, copy.deposit
+, copy.ref
+, copy.holdable
+, copy.deposit_amount
+, copy.price
+, copy.barcode
+, copy.circ_modifier
+, copy.circ_as_type
+, copy.dummy_title
+, copy.dummy_author
+, copy.alert_message
+, copy.opac_visible
+, copy.deleted 
+FROM asset.copy 
+UNION ALLSELECT asset_copy_history.audit_id AS &quot;?column?&quot;
+, asset_copy_history.audit_time
+, asset_copy_history.audit_action
+, asset_copy_history.id
+, asset_copy_history.circ_lib
+, asset_copy_history.creator
+, asset_copy_history.call_number
+, asset_copy_history.editor
+, asset_copy_history.create_date
+, asset_copy_history.edit_date
+, asset_copy_history.copy_number
+, asset_copy_history.status
+, asset_copy_history.location
+, asset_copy_history.loan_duration
+, asset_copy_history.fine_level
+, asset_copy_history.age_protect
+, asset_copy_history.circulate
+, asset_copy_history.deposit
+, asset_copy_history.ref
+, asset_copy_history.holdable
+, asset_copy_history.deposit_amount
+, asset_copy_history.price
+, asset_copy_history.barcode
+, asset_copy_history.circ_modifier
+, asset_copy_history.circ_as_type
+, asset_copy_history.dummy_title
+, asset_copy_history.dummy_author
+, asset_copy_history.alert_message
+, asset_copy_history.opac_visible
+, asset_copy_history.deleted 
+FROM auditor.asset_copy_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.table.biblio-record-entry-history">biblio_record_entry_history</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.biblio_record_entry_history Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>audit_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.view.biblio-record-entry-lifecycle">biblio_record_entry_lifecycle</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>auditor.biblio_record_entry_lifecycle Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>?column?</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>audit_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audit_action</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT (-1)
+, now
+() AS audit_time
+,&#39;-&#39; AS audit_action
+, record_entry.id
+, record_entry.creator
+, record_entry.editor
+, record_entry.source
+, record_entry.quality
+, record_entry.create_date
+, record_entry.edit_date
+, record_entry.active
+, record_entry.deleted
+, record_entry.fingerprint
+, record_entry.tcn_source
+, record_entry.tcn_value
+, record_entry.marc
+, record_entry.last_xact_id 
+FROM biblio.record_entry 
+UNION ALLSELECT biblio_record_entry_history.audit_id AS &quot;?column?&quot;
+, biblio_record_entry_history.audit_time
+, biblio_record_entry_history.audit_action
+, biblio_record_entry_history.id
+, biblio_record_entry_history.creator
+, biblio_record_entry_history.editor
+, biblio_record_entry_history.source
+, biblio_record_entry_history.quality
+, biblio_record_entry_history.create_date
+, biblio_record_entry_history.edit_date
+, biblio_record_entry_history.active
+, biblio_record_entry_history.deleted
+, biblio_record_entry_history.fingerprint
+, biblio_record_entry_history.tcn_source
+, biblio_record_entry_history.tcn_value
+, biblio_record_entry_history.marc
+, biblio_record_entry_history.last_xact_id 
+FROM auditor.biblio_record_entry_history;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#auditor.schema">Schema auditor</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-actor-org-unit-func">audit_actor_org_unit_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.actor_org_unit_history
+					SELECT	nextval(&#39;auditor.actor_org_unit_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-actor-usr-address-func">audit_actor_usr_address_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.actor_usr_address_history
+					SELECT	nextval(&#39;auditor.actor_usr_address_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-actor-usr-func">audit_actor_usr_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.actor_usr_history
+					SELECT	nextval(&#39;auditor.actor_usr_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-asset-call-number-func">audit_asset_call_number_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.asset_call_number_history
+					SELECT	nextval(&#39;auditor.asset_call_number_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-asset-copy-func">audit_asset_copy_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.asset_copy_history
+					SELECT	nextval(&#39;auditor.asset_copy_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.audit-biblio-record-entry-func">audit_biblio_record_entry_func()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+			BEGIN
+				INSERT INTO auditor.biblio_record_entry_history
+					SELECT	nextval(&#39;auditor.biblio_record_entry_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#auditor.schema">auditor</a>.<a name="auditor.function.create-auditor-tbl-text-sch-text">create_auditor(tbl text, sch text)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	EXECUTE $$
+			CREATE SEQUENCE auditor.$$ || sch || $$_$$ || tbl || $$_pkey_seq;
+	$$;
+
+	EXECUTE $$
+			CREATE TABLE auditor.$$ || sch || $$_$$ || tbl || $$_history (
+				audit_id	BIGINT				PRIMARY KEY,
+				audit_time	TIMESTAMP WITH TIME ZONE	NOT NULL,
+				audit_action	TEXT				NOT NULL,
+				LIKE $$ || sch || $$.$$ || tbl || $$
+			);
+	$$;
+
+	EXECUTE $$
+			CREATE FUNCTION auditor.audit_$$ || sch || $$_$$ || tbl || $$_func ()
+			RETURNS TRIGGER AS $func$
+			BEGIN
+				INSERT INTO auditor.$$ || sch || $$_$$ || tbl || $$_history
+					SELECT	nextval(&#39;auditor.$$ || sch || $$_$$ || tbl || $$_pkey_seq&#39;),
+						now(),
+						SUBSTR(TG_OP,1,1),
+						OLD.*;
+				RETURN NULL;
+			END;
+			$func$ LANGUAGE &#39;plpgsql&#39;;
+	$$;
+
+	EXECUTE $$
+			CREATE TRIGGER audit_$$ || sch || $$_$$ || tbl || $$_update_trigger
+				AFTER UPDATE OR DELETE ON $$ || sch || $$.$$ || tbl || $$ FOR EACH ROW
+				EXECUTE PROCEDURE auditor.audit_$$ || sch || $$_$$ || tbl || $$_func ();
+	$$;
+
+	EXECUTE $$
+			CREATE VIEW auditor.$$ || sch || $$_$$ || tbl || $$_lifecycle AS
+				SELECT	-1, now() as audit_time, &#39;-&#39; as audit_action, *
+				  FROM	$$ || sch || $$.$$ || tbl || $$
+				  	UNION ALL
+				SELECT	*
+				  FROM	auditor.$$ || sch || $$_$$ || tbl || $$_history;
+	$$;
+	RETURN TRUE;
+END;
+</pre>
+	
+
+<!-- authorityauthority -->
+
+		
+		<hr>
+		<h1>Schema authority</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#authority.schema">authority</a>.<a name="authority.table.full-rec">full_rec</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>authority.full_rec Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tag</td>
+            	<td>character(3)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ind1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ind2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>subfield</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       authority_full_rec_index_vector_idx index_vector
+    
+       authority_full_rec_record_idx record
+    
+       authority_full_rec_tag_part_idx "substring"((tag)::text, 2)
+    
+       authority_full_rec_tag_subfield_idx tag, subfield
+    
+       authority_full_rec_value_tpo_index value text_pattern_ops
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#authority.schema">Schema authority</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#authority.schema">authority</a>.<a name="authority.table.rec-descriptor">rec_descriptor</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>authority.rec_descriptor Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>record_status</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>char_encoding</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       authority_rec_descriptor_record_idx record
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#authority.schema">Schema authority</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#authority.schema">authority</a>.<a name="authority.table.record-entry">record_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>authority.record_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>arn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;AUTOGEN&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>arn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#authority.table.record-note">authority.record_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.authority-match">vandelay.authority_match</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-authority-record">vandelay.queued_authority_record</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       authority_record_entry_creator_idx creator
+    
+       authority_record_entry_editor_idx editor
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#authority.schema">Schema authority</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#authority.schema">authority</a>.<a name="authority.table.record-note">record_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>authority.record_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#authority.table.record-entry">authority.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       authority_record_note_creator_idx creator
+    
+       authority_record_note_editor_idx editor
+    
+       authority_record_note_record_idx record
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#authority.schema">Schema authority</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#authority.schema">authority</a>.<a name="authority.view.tracing-links">tracing_links</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>authority.tracing_links Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>main_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>main_tag</td>
+            	<td>character(3)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>main_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>relationship</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>use_restriction</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deprecation</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>display_restriction</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>link_id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>link_tag</td>
+            	<td>character(3)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>link_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT main.record
+, main.id AS main_id
+, main.tag AS main_tag
+, main.value AS main_value
+, substr
+(link.value
+     , 1
+     , 1
+) AS relationship
+, substr
+(link.value
+     , 2
+     , 1
+) AS use_restriction
+, substr
+(link.value
+     , 3
+     , 1
+) AS deprecation
+, substr
+(link.value
+     , 4
+     , 1
+) AS display_restriction
+, link_value.id AS link_id
+, link_value.tag AS link_tag
+, link_value.value AS link_value 
+FROM (
+     (authority.full_rec main 
+        JOIN authority.full_rec link 
+          ON (
+                 (
+                       (
+                             (link.record = main.record)
+                           AND (
+                                   (
+                                         (link.tag)::text = 
+                                         (
+                                               (
+                                                     (main.tag)::integer + 400
+                                               )
+                                         )::text
+                                   )
+                                  OR (
+                                         (link.tag)::text = 
+                                         (
+                                               (
+                                                     (main.tag)::integer + 300
+                                               )
+                                         )::text
+                                   )
+                             )
+                       )
+                     AND (link.subfield = &#39;w&#39;::text)
+                 )
+           )
+     )
+  JOIN authority.full_rec link_value 
+    ON (
+           (
+                 (
+                       (link_value.record = main.record)
+                     AND (link_value.tag = link.tag)
+                 )
+               AND (link_value.subfield = &#39;a&#39;::text)
+           )
+     )
+)
+WHERE (
+     (main.tag = ANY 
+           (ARRAY[&#39;100&#39;::bpchar
+                 ,&#39;110&#39;::bpchar
+                 ,&#39;111&#39;::bpchar
+                 ,&#39;130&#39;::bpchar
+                 ,&#39;150&#39;::bpchar
+                 ,&#39;151&#39;::bpchar
+                 ,&#39;155&#39;::bpchar
+                 ,&#39;180&#39;::bpchar
+                 ,&#39;181&#39;::bpchar
+                 ,&#39;182&#39;::bpchar
+                 ,&#39;185&#39;::bpchar]
+           )
+     )
+   AND (main.subfield = &#39;a&#39;::text)
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#authority.schema">Schema authority</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- bibliobiblio -->
+
+		
+		<hr>
+		<h1>Schema biblio</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#biblio.schema">biblio</a>.<a name="biblio.table.record-entry">record_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>biblio.record_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;AUTOGEN&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT biblio.next_autogen_tcn_value()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem">acq.lineitem</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.call-number">asset.call_number</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#biblio.table.record-note">biblio.record_note</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket-item">container.biblio_record_entry_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.author-field-entry">metabib.author_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.keyword-field-entry">metabib.keyword_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.metarecord">metabib.metarecord</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.metarecord-source-map">metabib.metarecord_source_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.real-full-rec">metabib.real_full_rec</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.rec-descriptor">metabib.rec_descriptor</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.subject-field-entry">metabib.subject_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.title-field-entry">metabib.title_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.record-entry">serial.record_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.bib-match">vandelay.bib_match</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       biblio_record_entry_create_date_idx create_date
+    
+       biblio_record_entry_creator_idx creator
+    
+       biblio_record_entry_edit_date_idx edit_date
+    
+       biblio_record_entry_editor_idx editor
+    
+       biblio_record_entry_fp_idx fingerprint
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#biblio.schema">Schema biblio</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#biblio.schema">biblio</a>.<a name="biblio.table.record-note">record_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>biblio.record_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       biblio_record_note_creator_idx creator
+    
+       biblio_record_note_editor_idx editor
+    
+       biblio_record_note_record_idx record
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#biblio.schema">Schema biblio</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#biblio.schema">biblio</a>.<a name="biblio.function.next-autogen-tcn-value">next_autogen_tcn_value()</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+	BEGIN RETURN &#39;AUTOGENERATED-&#39; || nextval(&#39;biblio.autogen_tcn_value_seq&#39;::TEXT); END;
+</pre>
+	
+
+<!-- configconfig -->
+
+		
+		<hr>
+		<h1>Schema config</h1>
+		
+			<p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander <mrylander at gmail.com>
+ *
+ * The config schema holds static configuration data for the
+ * Open-ILS installation.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.audience-map">audience_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.audience_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.bib-level-map">bib_level_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.bib_level_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.bib-source">bib_source</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Valid sources of MARC records
+ *
+ * This is table is used to set up the relative &quot;quality&quot; of each
+ * MARC source, such as OCLC.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.bib_source Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>transcendant</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.bib_source Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>bib_source_quality_check</td>
+                <td>CHECK (((quality &gt;= 0) AND (quality &lt;= 100)))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.billing-type">billing_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.billing_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>default_price</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#money.table.billing">money.billing</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.circ-matrix-circ-mod-test">circ_matrix_circ_mod_test</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.circ_matrix_circ_mod_test Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint.id</a>
+                  
+                
+                </td>
+            	<td>matchpoint</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>items_out</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-circ-mod-test-map">config.circ_matrix_circ_mod_test_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.circ-matrix-circ-mod-test-map">circ_matrix_circ_mod_test_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.circ_matrix_circ_mod_test_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-matrix-circ-mod-test">config.circ_matrix_circ_mod_test.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>circ_mod_test</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-modifier">config.circ_modifier.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>circ_mod</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.circ-matrix-matchpoint">circ_matrix_matchpoint</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.circ_matrix_matchpoint Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-modifier">config.circ_modifier.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.item-type-map">config.item_type_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.item-form-map">config.item_form_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_form</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.videorecording-format-map">config.videorecording_format_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_vr_format</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>ref_flag</td>
+            	<td>boolean</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>juvenile_flag</td>
+            	<td>boolean</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>is_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>usr_age_lower_bound</td>
+            	<td>interval</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>usr_age_upper_bound</td>
+            	<td>interval</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.rule-circ-duration">config.rule_circ_duration.id</a>
+                  
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.rule-recuring-fine">config.rule_recuring_fine.id</a>
+                  
+                
+                </td>
+            	<td>recurring_fine_rule</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.rule-max-fine">config.rule_max_fine.id</a>
+                  
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>script_test</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-circ-mod-test">config.circ_matrix_circ_mod_test</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.circ-modifier">circ_modifier</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.circ_modifier Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>sip2_media_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>magnetic_media</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#acq.table.lineitem-detail">acq.lineitem_detail</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-circ-mod-test-map">config.circ_matrix_circ_mod_test_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.copy-status">copy_status</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Copy Statuses
+ *
+ * The available copy statuses, and whether a copy in that
+ * status is available for hold request capture.  0 (zero) is
+ * the only special number in this set, meaning that the item
+ * is available for immediate checkout, and is counted as available
+ * in the OPAC.
+ *
+ * Statuses with an ID below 100 are not removable, and have special
+ * meaning in the code.  Do not change them except to translate the
+ * textual name.
+ *
+ * You may add and remove statuses above 100, and these can be used
+ * to remove items from normal circulation without affecting the rest
+ * of the copy&#39;s values or its location.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.copy_status Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.transit-copy">action.transit_copy</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#asset.table.copy">asset.copy</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.hold-matrix-matchpoint">hold_matrix_matchpoint</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.hold_matrix_matchpoint Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>user_home_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>request_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>pickup_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>item_owning_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>item_circ_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>usr_grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>requestor_grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.circ-modifier">config.circ_modifier.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.item-type-map">config.item_type_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.item-form-map">config.item_form_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_form</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.videorecording-format-map">config.videorecording_format_map.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>marc_vr_format</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>juvenile_flag</td>
+            	<td>boolean</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>ref_flag</td>
+            	<td>boolean</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>distance_is_from_owner</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit-type">actor.org_unit_type.id</a>
+                  
+                
+                </td>
+            	<td>transit_range</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_holds</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>include_frozen_holds</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_blocked_user</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.rule-age-hold-protect">config.rule_age_hold_protect.id</a>
+                  
+                
+                </td>
+            	<td>age_hold_protect_rule</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.i18n-core">i18n_core</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.i18n_core Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fq_field</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>identity_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.i18n-locale">config.i18n_locale.code</a>
+                  
+                
+                </td>
+            	<td>translation</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>string</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.i18n-locale">i18n_locale</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.i18n_locale Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.language-map">config.language_map.code</a>
+                  
+                
+                </td>
+            	<td>marc_code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.i18n-core">config.i18n_core</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.identification-type">identification_type</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Types of valid patron identification.
+ *
+ * Each patron must display at least one valid form of identification
+ * in order to get a library card.  This table lists those forms.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.identification_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.idl-field-doc">idl_field_doc</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.idl_field_doc Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fm_class</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>field</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>string</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.item-form-map">item_form_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.item_form_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.item-type-map">item_type_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.item_type_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.language-map">language_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.language_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.i18n-locale">config.i18n_locale</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.lit-form-map">lit_form_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.lit_form_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.metabib-field">metabib_field</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * XPath used for record indexing ingest
+ *
+ * This table contains the XPath used to chop up MODS into its
+ * indexable parts.  Each XPath entry is named and assigned to
+ * a &quot;class&quot; of either title, subject, author, keyword or series.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.metabib_field Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>field_class</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>weight</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>format</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;mods33&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>search_field</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>facet_field</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.metabib_field Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>metabib_field_field_class_check</td>
+                <td>CHECK ((lower(field_class) = ANY (ARRAY[&#39;title&#39;::text, &#39;author&#39;::text, &#39;subject&#39;::text, &#39;keyword&#39;::text, &#39;series&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#metabib.table.author-field-entry">metabib.author_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.keyword-field-entry">metabib.keyword_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.subject-field-entry">metabib.subject_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#metabib.table.title-field-entry">metabib.title_field_entry</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#search.table.relevance-adjustment">search.relevance_adjustment</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.net-access-level">net_access_level</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Patron Network Access level
+ *
+ * This will be used to inform the in-library firewall of how much
+ * internet access the using patron should be allowed.
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.net_access_level Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.non-cataloged-type">non_cataloged_type</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Types of valid non-cataloged items.
+ *
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.non_cataloged_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;14 days&#39;::interval
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>in_house</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#action.table.non-cat-in-house-use">action.non_cat_in_house_use</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#action.table.non-cataloged-circulation">action.non_cataloged_circulation</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.rule-age-hold-protect">rule_age_hold_protect</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Hold Item Age Protection rules
+ *
+ * A hold request can only capture new(ish) items when they are
+ * within a particular proximity of the home_ou of the requesting
+ * user.  The proximity (&#39;prox&#39; column) is calculated by counting
+ * the number of tree edges between the user&#39;s home_ou and the owning_lib
+ * of the copy that could fulfill the hold.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.rule_age_hold_protect Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>age</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>prox</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.rule_age_hold_protect Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>rule_age_hold_protect_name_check</td>
+                <td>CHECK ((name ~ &#39;^\\w+$&#39;::text))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.rule-circ-duration">rule_circ_duration</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Circulation Duration rules
+ *
+ * Each circulation is given a duration based on one of these rules.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.rule_circ_duration Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>extended</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>normal</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>shrt</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>max_renewals</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.rule_circ_duration Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>rule_circ_duration_name_check</td>
+                <td>CHECK ((name ~ &#39;^\\w+$&#39;::text))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.rule-max-fine">rule_max_fine</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Circulation Max Fine rules
+ *
+ * Each circulation is given a maximum fine based on one of
+ * these rules.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.rule_max_fine Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>is_percent</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.rule_max_fine Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>rule_max_fine_name_check</td>
+                <td>CHECK ((name ~ &#39;^\\w+$&#39;::text))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.rule-recuring-fine">rule_recuring_fine</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Circulation Recurring Fine rules
+ *
+ * Each circulation is given a recurring fine amount based on one of
+ * these rules.  The recurance_interval should not be any shorter
+ * than the interval between runs of the fine_processor.pl script
+ * (which is run from CRON), or you could miss fines.
+ * 
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.rule_recuring_fine Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>high</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>normal</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>low</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recurance_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;1 day&#39;::interval
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>config.rule_recuring_fine Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>rule_recuring_fine_name_check</td>
+                <td>CHECK ((name ~ &#39;^\\w+$&#39;::text))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.standing">standing</a>
+		</h2>
+        
+         <p>
+/*
+ * Copyright (C) 2005  Georgia Public Library Service 
+ * Mike Rylander &lt;mrylander at gmail.com&gt;
+ *
+ * Patron Standings
+ *
+ * This table contains the values that can be applied to a patron
+ * by a staff member.  These values should not be changed, other
+ * than for translation, as the ID column is currently a &quot;magic
+ * number&quot; in the source. :(
+ *
+ * ****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+</p>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.standing Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.standing-penalty">standing_penalty</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.standing_penalty Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>block_list</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr-standing-penalty">actor.usr_standing_penalty</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.grp-penalty-threshold">permission.grp_penalty_threshold</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.upgrade-log">upgrade_log</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.upgrade_log Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>version</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>install_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.videorecording-format-map">videorecording_format_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.videorecording_format_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.xml-transform">xml_transform</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.xml_transform Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>namespace_uri</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>prefix</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xslt</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.z3950-attr">z3950_attr</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.z3950_attr Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.z3950-source">config.z3950_source.name</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>format</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>truncation</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#config.schema">config</a>.<a name="config.table.z3950-source">z3950_source</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>config.z3950_source Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>host</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>port</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>db</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>record_format</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;FI&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>transmission_format</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;usmarc&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>auth</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#config.table.z3950-attr">config.z3950_attr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#config.schema">Schema config</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- containercontainer -->
+
+		
+		<hr>
+		<h1>Schema container</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.biblio-record-entry-bucket">biblio_record_entry_bucket</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.biblio_record_entry_bucket Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.biblio-record-entry-bucket-type">container.biblio_record_entry_bucket_type.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>btype</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;misc&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket-item">container.biblio_record_entry_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket-note">container.biblio_record_entry_bucket_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.biblio-record-entry-bucket-item">biblio_record_entry_bucket_item</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.biblio_record_entry_bucket_item Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.biblio-record-entry-bucket">container.biblio_record_entry_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>target_biblio_record_entry</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pos</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket-item-note">container.biblio_record_entry_bucket_item_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.biblio-record-entry-bucket-item-note">biblio_record_entry_bucket_item_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.biblio_record_entry_bucket_item_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.biblio-record-entry-bucket-item">container.biblio_record_entry_bucket_item.id</a>
+                  
+                
+                </td>
+            	<td>item</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.biblio-record-entry-bucket-note">biblio_record_entry_bucket_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.biblio_record_entry_bucket_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.biblio-record-entry-bucket">container.biblio_record_entry_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.biblio-record-entry-bucket-type">biblio_record_entry_bucket_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.biblio_record_entry_bucket_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.biblio-record-entry-bucket">container.biblio_record_entry_bucket</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.call-number-bucket">call_number_bucket</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.call_number_bucket Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.call-number-bucket-type">container.call_number_bucket_type.code</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>btype</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;misc&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket-item">container.call_number_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket-note">container.call_number_bucket_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.call-number-bucket-item">call_number_bucket_item</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.call_number_bucket_item Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.call-number-bucket">container.call_number_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.call-number">asset.call_number.id</a>
+                  
+                
+                </td>
+            	<td>target_call_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pos</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket-item-note">container.call_number_bucket_item_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.call-number-bucket-item-note">call_number_bucket_item_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.call_number_bucket_item_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.call-number-bucket-item">container.call_number_bucket_item.id</a>
+                  
+                
+                </td>
+            	<td>item</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.call-number-bucket-note">call_number_bucket_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.call_number_bucket_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.call-number-bucket">container.call_number_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.call-number-bucket-type">call_number_bucket_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.call_number_bucket_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.call-number-bucket">container.call_number_bucket</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.copy-bucket">copy_bucket</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.copy_bucket Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#container.table.copy-bucket-type">container.copy_bucket_type.code</a>
+                  
+                
+                </td>
+            	<td>btype</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT &#39;misc&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket-item">container.copy_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket-note">container.copy_bucket_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.copy-bucket-item">copy_bucket_item</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.copy_bucket_item Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.copy-bucket">container.copy_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pos</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket-item-note">container.copy_bucket_item_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       copy_bucket_item_bucket_idx bucket
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.copy-bucket-item-note">copy_bucket_item_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.copy_bucket_item_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.copy-bucket-item">container.copy_bucket_item.id</a>
+                  
+                
+                </td>
+            	<td>item</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.copy-bucket-note">copy_bucket_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.copy_bucket_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.copy-bucket">container.copy_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.copy-bucket-type">copy_bucket_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.copy_bucket_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.copy-bucket">container.copy_bucket</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.user-bucket">user_bucket</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.user_bucket Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#container.table.user-bucket-type">container.user_bucket_type.code</a>
+                  
+                
+                </td>
+            	<td>btype</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT &#39;misc&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket-item">container.user_bucket_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket-note">container.user_bucket_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.user-bucket-item">user_bucket_item</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.user_bucket_item Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.user-bucket">container.user_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>target_user</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pos</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket-item-note">container.user_bucket_item_note</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.user-bucket-item-note">user_bucket_item_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.user_bucket_item_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.user-bucket-item">container.user_bucket_item.id</a>
+                  
+                
+                </td>
+            	<td>item</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.user-bucket-note">user_bucket_note</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.user_bucket_note Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#container.table.user-bucket">container.user_bucket.id</a>
+                  
+                
+                </td>
+            	<td>bucket</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#container.schema">container</a>.<a name="container.table.user-bucket-type">user_bucket_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>container.user_bucket_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#container.table.user-bucket">container.user_bucket</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#container.schema">Schema container</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- extend_reporterextend_reporter -->
+
+		
+		<hr>
+		<h1>Schema extend_reporter</h1>
+		
+
+		
+		
+        <hr>
+		<h2>View:
+			
+			<a href="#extend-reporter.schema">extend_reporter</a>.<a name="extend-reporter.view.full-circ-count">full_circ_count</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>extend_reporter.full_circ_count Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_count</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT cp.id
+, (COALESCE
+     (sum
+           (c.circ_count)
+           , (0)::bigint
+     ) + COALESCE
+     (count
+           (circ.id)
+           , (0)::bigint
+     )
+) AS circ_count 
+FROM (
+     (asset.copy cp 
+   LEFT JOIN extend_reporter.legacy_circ_count c 
+       USING (id)
+     )
+LEFT JOIN action.all_circulation circ 
+    ON (
+           (circ.target_copy = cp.id)
+     )
+)
+GROUP BY cp.id;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#extend-reporter.schema">Schema extend_reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#extend-reporter.schema">extend_reporter</a>.<a name="extend-reporter.view.global-bibs-by-holding-update">global_bibs_by_holding_update</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>extend_reporter.global_bibs_by_holding_update Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holding_update</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>update_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT DISTINCT 
+ON (x.id) x.id
+, x.holding_update
+, x.update_type 
+FROM (
+SELECT b.id
+     , last
+     (cp.create_date) AS holding_update
+     ,&#39;add&#39; AS update_type 
+  FROM (
+           (biblio.record_entry b 
+              JOIN asset.call_number cn 
+                ON (
+                       (cn.record = b.id)
+                 )
+           )
+        JOIN asset.copy cp 
+          ON (
+                 (cp.call_number = cn.id)
+           )
+     )
+ WHERE (
+           (NOT cp.deleted)
+         AND (b.id &gt; 0)
+     )
+GROUP BY b.id 
+ UNIONSELECT b.id
+     , last
+     (cp.edit_date) AS holding_update
+     ,&#39;delete&#39; AS update_type 
+  FROM (
+           (biblio.record_entry b 
+              JOIN asset.call_number cn 
+                ON (
+                       (cn.record = b.id)
+                 )
+           )
+        JOIN asset.copy cp 
+          ON (
+                 (cp.call_number = cn.id)
+           )
+     )
+ WHERE (cp.deleted 
+         AND (b.id &gt; 0)
+     )
+GROUP BY b.id
+) x 
+ORDER BY x.id
+, x.holding_update;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#extend-reporter.schema">Schema extend_reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#extend-reporter.schema">extend_reporter</a>.<a name="extend-reporter.table.legacy-circ-count">legacy_circ_count</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>extend_reporter.legacy_circ_count Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#extend-reporter.schema">Schema extend_reporter</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- metabibmetabib -->
+
+		
+		<hr>
+		<h1>Schema metabib</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.author-field-entry">author_field_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.author_field_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.metabib-field">config.metabib_field.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_author_field_entry_index_vector_idx index_vector
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.view.full-rec">full_rec</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.full_rec Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tag</td>
+            	<td>character(3)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ind1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ind2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>subfield</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT real_full_rec.id
+, real_full_rec.record
+, real_full_rec.tag
+, real_full_rec.ind1
+, real_full_rec.ind2
+, real_full_rec.subfield
+,&quot;substring&quot;
+(real_full_rec.value
+     , 1
+     , 1024
+) AS value
+, real_full_rec.index_vector 
+FROM metabib.real_full_rec;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.keyword-field-entry">keyword_field_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.keyword_field_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.metabib-field">config.metabib_field.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_keyword_field_entry_index_vector_idx index_vector
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.metarecord">metarecord</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.metarecord Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>master_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>mods</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#metabib.table.metarecord-source-map">metabib.metarecord_source_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       metabib_metarecord_fingerprint_idx fingerprint
+    
+       metabib_metarecord_master_record_idx master_record
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.metarecord-source-map">metarecord_source_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.metarecord_source_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#metabib.table.metarecord">metabib.metarecord.id</a>
+                  
+                
+                </td>
+            	<td>metarecord</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_metarecord_source_map_metarecord_idx metarecord
+    
+       metabib_metarecord_source_map_source_record_idx source
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.real-full-rec">real_full_rec</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.real_full_rec Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;metabib.full_rec_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tag</td>
+            	<td>character(3)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ind1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ind2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>subfield</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_full_rec_index_vector_idx index_vector
+    
+       metabib_full_rec_record_idx record
+    
+       metabib_full_rec_tag_subfield_idx tag, subfield
+    
+       metabib_full_rec_value_idx "substring"(value, 1, 1024)
+    
+       metabib_full_rec_value_tpo_index "substring"(value, 1, 1024) text_pattern_ops
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.rec-descriptor">rec_descriptor</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.rec_descriptor Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>item_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>bib_level</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>control_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>char_encoding</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>enc_level</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>audience</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>lit_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>type_mat</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>cat_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub_status</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_lang</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>vr_format</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>date1</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>date2</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_rec_descriptor_record_idx record
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.series-field-entry">series_field_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.series_field_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_series_field_entry_index_vector_idx index_vector
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.subject-field-entry">subject_field_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.subject_field_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.metabib-field">config.metabib_field.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_subject_field_entry_index_vector_idx index_vector
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#metabib.schema">metabib</a>.<a name="metabib.table.title-field-entry">title_field_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>metabib.title_field_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>source</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.metabib-field">config.metabib_field.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>index_vector</td>
+            	<td>tsvector</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       metabib_title_field_entry_index_vector_idx index_vector
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#metabib.schema">Schema metabib</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- moneymoney -->
+
+		
+		<hr>
+		<h1>Schema money</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.billable-xact">billable_xact</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.billable_xact Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       m_b_x_open_xacts_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.billable-xact-summary">billable_xact_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.billable_xact_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT xact.id
+, xact.usr
+, xact.xact_start
+, xact.xact_finish
+, credit.amount AS total_paid
+, credit.payment_ts AS last_payment_ts
+, credit.note AS last_payment_note
+, credit.payment_type AS last_payment_type
+, debit.amount AS total_owed
+, debit.billing_ts AS last_billing_ts
+, debit.note AS last_billing_note
+, debit.billing_type AS last_billing_type
+, (COALESCE
+     (debit.amount
+           , (0)::numeric
+     ) - COALESCE
+     (credit.amount
+           , (0)::numeric
+     )
+) AS balance_owed
+, p.relname AS xact_type 
+FROM (
+     (
+           (money.billable_xact xact 
+              JOIN pg_class p 
+                ON (
+                       (xact.tableoid = p.oid)
+                 )
+           )
+   LEFT JOIN (
+            SELECT billing.xact
+                 , sum
+                 (billing.amount) AS amount
+                 , max
+                 (billing.billing_ts) AS billing_ts
+                 , last
+                 (billing.note) AS note
+                 , last
+                 (billing.billing_type) AS billing_type 
+              FROM money.billing 
+             WHERE (billing.voided IS FALSE)
+          GROUP BY billing.xact
+           ) debit 
+          ON (
+                 (xact.id = debit.xact)
+           )
+     )
+LEFT JOIN (
+      SELECT payment_view.xact
+           , sum
+           (payment_view.amount) AS amount
+           , max
+           (payment_view.payment_ts) AS payment_ts
+           , last
+           (payment_view.note) AS note
+           , last
+           (payment_view.payment_type) AS payment_type 
+        FROM money.payment_view 
+       WHERE (payment_view.voided IS FALSE)
+    GROUP BY payment_view.xact
+     ) credit 
+    ON (
+           (xact.id = credit.xact)
+     )
+)
+ORDER BY debit.billing_ts
+, credit.payment_ts;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.billable-xact-with-void-summary">billable_xact_with_void_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.billable_xact_with_void_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT xact.id
+, xact.usr
+, xact.xact_start
+, xact.xact_finish
+, sum
+(credit.amount) AS total_paid
+, max
+(credit.payment_ts) AS last_payment_ts
+, last
+(credit.note) AS last_payment_note
+, last
+(credit.payment_type) AS last_payment_type
+, sum
+(debit.amount) AS total_owed
+, max
+(debit.billing_ts) AS last_billing_ts
+, last
+(debit.note) AS last_billing_note
+, last
+(debit.billing_type) AS last_billing_type
+, (COALESCE
+     (sum
+           (debit.amount)
+           , (0)::numeric
+     ) - COALESCE
+     (sum
+           (credit.amount)
+           , (0)::numeric
+     )
+) AS balance_owed
+, p.relname AS xact_type 
+FROM (
+     (
+           (money.billable_xact xact 
+              JOIN pg_class p 
+                ON (
+                       (xact.tableoid = p.oid)
+                 )
+           )
+   LEFT JOIN money.billing debit 
+          ON (
+                 (xact.id = debit.xact)
+           )
+     )
+LEFT JOIN money.payment_view credit 
+    ON (
+           (xact.id = credit.xact)
+     )
+)
+GROUP BY xact.id
+, xact.usr
+, xact.xact_start
+, xact.xact_finish
+, p.relname 
+ORDER BY max
+(debit.billing_ts)
+, max
+(credit.payment_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.billing">billing</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.billing Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>voider</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>void_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.billing-type">config.billing_type.id</a>
+                  
+                
+                </td>
+            	<td>btype</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       m_b_time_idx billing_ts
+    
+       m_b_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.bnm-desk-payment">bnm_desk_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.bnm_desk_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.workstation">actor.workstation.id</a>
+                  
+                
+                </td>
+            	<td>cash_drawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.bnm_desk_payment Inherits
+        
+            
+           <a href="#money.table.bnm-payment">bnm_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.bnm-payment">bnm_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.bnm_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.bnm_payment Inherits
+        
+            
+           <a href="#money.table.payment">payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.bnm-payment-view">bnm_payment_view</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.bnm_payment_view Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT p.id
+, p.xact
+, p.payment_ts
+, p.voided
+, p.amount
+, p.note
+, p.amount_collected
+, p.accepting_usr
+, c.relname AS payment_type 
+FROM (money.bnm_payment p 
+  JOIN pg_class c 
+    ON (
+           (p.tableoid = c.oid)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.cash-payment">cash_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.cash_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cash_drawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.cash_payment Inherits
+        
+            
+           <a href="#money.table.bnm-desk-payment">bnm_desk_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_cash_id_idx id
+    
+       money_cash_payment_accepting_usr_idx accepting_usr
+    
+       money_cash_payment_cash_drawer_idx cash_drawer
+    
+       money_cash_payment_ts_idx payment_ts
+    
+       money_cash_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.cashdrawer-payment-view">cashdrawer_payment_view</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.cashdrawer_payment_view Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>cashdrawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT ou.id AS org_unit
+, ws.id AS cashdrawer
+, t.payment_type
+, p.payment_ts
+, p.amount
+, p.voided
+, p.note 
+FROM (
+     (
+           (actor.org_unit ou 
+              JOIN actor.workstation ws 
+                ON (
+                       (ou.id = ws.owning_lib)
+                 )
+           )
+   LEFT JOIN money.bnm_desk_payment p 
+          ON (
+                 (ws.id = p.cash_drawer)
+           )
+     )
+LEFT JOIN money.payment_view t 
+    ON (
+           (p.id = t.id)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.check-payment">check_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.check_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cash_drawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>check_number</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.check_payment Inherits
+        
+            
+           <a href="#money.table.bnm-desk-payment">bnm_desk_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_check_id_idx id
+    
+       money_check_payment_accepting_usr_idx accepting_usr
+    
+       money_check_payment_cash_drawer_idx cash_drawer
+    
+       money_check_payment_ts_idx payment_ts
+    
+       money_check_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.collections-tracker">collections_tracker</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.collections_tracker Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>collector</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>enter_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.credit-card-payment">credit_card_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.credit_card_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cash_drawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>cc_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cc_number</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>expire_month</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>expire_year</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>approval_code</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.credit_card_payment Inherits
+        
+            
+           <a href="#money.table.bnm-desk-payment">bnm_desk_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_credit_card_id_idx id
+    
+       money_credit_card_payment_accepting_usr_idx accepting_usr
+    
+       money_credit_card_payment_cash_drawer_idx cash_drawer
+    
+       money_credit_card_payment_ts_idx payment_ts
+    
+       money_credit_card_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.credit-payment">credit_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.credit_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.credit_payment Inherits
+        
+            
+           <a href="#money.table.bnm-payment">bnm_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_credit_id_idx id
+    
+       money_credit_payment_accepting_usr_idx accepting_usr
+    
+       money_credit_payment_payment_ts_idx payment_ts
+    
+       money_credit_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.desk-payment-view">desk_payment_view</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.desk_payment_view Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>cash_drawer</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT p.id
+, p.xact
+, p.payment_ts
+, p.voided
+, p.amount
+, p.note
+, p.amount_collected
+, p.accepting_usr
+, p.cash_drawer
+, c.relname AS payment_type 
+FROM (money.bnm_desk_payment p 
+  JOIN pg_class c 
+    ON (
+           (p.tableoid = c.oid)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.forgive-payment">forgive_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.forgive_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.forgive_payment Inherits
+        
+            
+           <a href="#money.table.bnm-payment">bnm_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_forgive_id_idx id
+    
+       money_forgive_payment_accepting_usr_idx accepting_usr
+    
+       money_forgive_payment_payment_ts_idx payment_ts
+    
+       money_forgive_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.goods-payment">goods_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.goods_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.goods_payment Inherits
+        
+            
+           <a href="#money.table.bnm-payment">bnm_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_goods_id_idx id
+    
+       money_goods_payment_accepting_usr_idx accepting_usr
+    
+       money_goods_payment_payment_ts_idx payment_ts
+    
+       money_goods_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.grocery">grocery</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.grocery Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.billable_xact_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>billing_location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.grocery Inherits
+        
+            
+           <a href="#money.table.billable-xact">billable_xact</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       circ_open_date_idx xact_start) WHERE (xact_finish IS NULL
+    
+       m_g_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.materialized-billable-xact-summary">materialized_billable_xact_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.materialized_billable_xact_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_mat_summary_id_idx id
+    
+       money_mat_summary_usr_idx usr
+    
+       money_mat_summary_xact_start_idx xact_start
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.non-drawer-payment-view">non_drawer_payment_view</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.non_drawer_payment_view Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT p.id
+, p.xact
+, p.payment_ts
+, p.voided
+, p.amount
+, p.note
+, p.amount_collected
+, p.accepting_usr
+, c.relname AS payment_type 
+FROM (money.bnm_payment p 
+  JOIN pg_class c 
+    ON (
+           (p.tableoid = c.oid)
+     )
+)
+WHERE (c.relname &lt;&gt; ALL 
+     (ARRAY[&#39;cash_payment&#39;::name
+           ,&#39;check_payment&#39;::name
+           ,&#39;credit_card_payment&#39;::name]
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-billable-xact-summary">open_billable_xact_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_billable_xact_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>billing_location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT xact.id
+, xact.usr
+, COALESCE
+(circ.circ_lib
+     , groc.billing_location
+) AS billing_location
+, xact.xact_start
+, xact.xact_finish
+, sum
+(credit.amount) AS total_paid
+, max
+(credit.payment_ts) AS last_payment_ts
+, last
+(credit.note) AS last_payment_note
+, last
+(credit.payment_type) AS last_payment_type
+, sum
+(debit.amount) AS total_owed
+, max
+(debit.billing_ts) AS last_billing_ts
+, last
+(debit.note) AS last_billing_note
+, last
+(debit.billing_type) AS last_billing_type
+, (COALESCE
+     (sum
+           (debit.amount)
+           , (0)::numeric
+     ) - COALESCE
+     (sum
+           (credit.amount)
+           , (0)::numeric
+     )
+) AS balance_owed
+, p.relname AS xact_type 
+FROM (
+     (
+           (
+                 (
+                       (money.billable_xact xact 
+                          JOIN pg_class p 
+                            ON (
+                                   (xact.tableoid = p.oid)
+                             )
+                       )
+               LEFT JOIN action.circulation circ 
+                      ON (
+                             (circ.id = xact.id)
+                       )
+                 )
+         LEFT JOIN money.grocery groc 
+                ON (
+                       (groc.id = xact.id)
+                 )
+           )
+   LEFT JOIN (
+            SELECT billing.xact
+                 , billing.voided
+                 , sum
+                 (billing.amount) AS amount
+                 , max
+                 (billing.billing_ts) AS billing_ts
+                 , last
+                 (billing.note) AS note
+                 , last
+                 (billing.billing_type) AS billing_type 
+              FROM money.billing 
+             WHERE (billing.voided IS FALSE)
+          GROUP BY billing.xact
+                 , billing.voided
+           ) debit 
+          ON (
+                 (
+                       (xact.id = debit.xact)
+                     AND (debit.voided IS FALSE)
+                 )
+           )
+     )
+LEFT JOIN (
+      SELECT payment_view.xact
+           , payment_view.voided
+           , sum
+           (payment_view.amount) AS amount
+           , max
+           (payment_view.payment_ts) AS payment_ts
+           , last
+           (payment_view.note) AS note
+           , last
+           (payment_view.payment_type) AS payment_type 
+        FROM money.payment_view 
+       WHERE (payment_view.voided IS FALSE)
+    GROUP BY payment_view.xact
+           , payment_view.voided
+     ) credit 
+    ON (
+           (
+                 (xact.id = credit.xact)
+               AND (credit.voided IS FALSE)
+           )
+     )
+)
+WHERE (xact.xact_finish IS NULL)
+GROUP BY xact.id
+, xact.usr
+, COALESCE
+(circ.circ_lib
+     , groc.billing_location
+)
+, xact.xact_start
+, xact.xact_finish
+, p.relname 
+ORDER BY max
+(debit.billing_ts)
+, max
+(credit.payment_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-transaction-billing-summary">open_transaction_billing_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_transaction_billing_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billing.xact
+, last
+(billing.billing_type) AS last_billing_type
+, last
+(billing.note) AS last_billing_note
+, max
+(billing.billing_ts) AS last_billing_ts
+, sum
+(COALESCE
+     (billing.amount
+           , (0)::numeric
+     )
+) AS total_owed 
+FROM money.billing 
+WHERE (billing.voided IS FALSE)
+GROUP BY billing.xact 
+ORDER BY max
+(billing.billing_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-transaction-billing-type-summary">open_transaction_billing_type_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_transaction_billing_type_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billing.xact
+, billing.billing_type AS last_billing_type
+, last
+(billing.note) AS last_billing_note
+, max
+(billing.billing_ts) AS last_billing_ts
+, sum
+(COALESCE
+     (billing.amount
+           , (0)::numeric
+     )
+) AS total_owed 
+FROM money.billing 
+WHERE (billing.voided IS FALSE)
+GROUP BY billing.xact
+, billing.billing_type 
+ORDER BY max
+(billing.billing_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-transaction-payment-summary">open_transaction_payment_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_transaction_payment_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT payment_view.xact
+, last
+(payment_view.payment_type) AS last_payment_type
+, last
+(payment_view.note) AS last_payment_note
+, max
+(payment_view.payment_ts) AS last_payment_ts
+, sum
+(COALESCE
+     (payment_view.amount
+           , (0)::numeric
+     )
+) AS total_paid 
+FROM money.payment_view 
+WHERE (payment_view.voided IS FALSE)
+GROUP BY payment_view.xact 
+ORDER BY max
+(payment_view.payment_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-usr-circulation-summary">open_usr_circulation_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_usr_circulation_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT open_billable_xact_summary.usr
+, sum
+(open_billable_xact_summary.total_paid) AS total_paid
+, sum
+(open_billable_xact_summary.total_owed) AS total_owed
+, sum
+(open_billable_xact_summary.balance_owed) AS balance_owed 
+FROM money.open_billable_xact_summary 
+WHERE (open_billable_xact_summary.xact_type = &#39;circulation&#39;::name)
+GROUP BY open_billable_xact_summary.usr;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.open-usr-summary">open_usr_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.open_usr_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT open_billable_xact_summary.usr
+, sum
+(open_billable_xact_summary.total_paid) AS total_paid
+, sum
+(open_billable_xact_summary.total_owed) AS total_owed
+, sum
+(open_billable_xact_summary.balance_owed) AS balance_owed 
+FROM money.open_billable_xact_summary 
+GROUP BY open_billable_xact_summary.usr;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.payment">payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       m_p_time_idx payment_ts
+    
+       m_p_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.payment-view">payment_view</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.payment_view Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT p.id
+, p.xact
+, p.payment_ts
+, p.voided
+, p.amount
+, p.note
+, c.relname AS payment_type 
+FROM (money.payment p 
+  JOIN pg_class c 
+    ON (
+           (p.tableoid = c.oid)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.transaction-billing-summary">transaction_billing_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.transaction_billing_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billing.xact
+, last
+(billing.billing_type) AS last_billing_type
+, last
+(billing.note) AS last_billing_note
+, max
+(billing.billing_ts) AS last_billing_ts
+, sum
+(COALESCE
+     (billing.amount
+           , (0)::numeric
+     )
+) AS total_owed 
+FROM money.billing 
+WHERE (billing.voided IS FALSE)
+GROUP BY billing.xact 
+ORDER BY max
+(billing.billing_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.transaction-billing-type-summary">transaction_billing_type_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.transaction_billing_type_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billing.xact
+, billing.billing_type AS last_billing_type
+, last
+(billing.note) AS last_billing_note
+, max
+(billing.billing_ts) AS last_billing_ts
+, sum
+(COALESCE
+     (billing.amount
+           , (0)::numeric
+     )
+) AS total_owed 
+FROM money.billing 
+WHERE (billing.voided IS FALSE)
+GROUP BY billing.xact
+, billing.billing_type 
+ORDER BY max
+(billing.billing_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.transaction-billing-with-void-summary">transaction_billing_with_void_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.transaction_billing_with_void_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_billing_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_billing_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billing.xact
+, last
+(billing.billing_type) AS last_billing_type
+, last
+(billing.note) AS last_billing_note
+, max
+(billing.billing_ts) AS last_billing_ts
+, sum
+(CASE WHEN billing.voided THEN 
+     (0)::numeric ELSE COALESCE
+     (billing.amount
+           , (0)::numeric
+     ) END
+) AS total_owed 
+FROM money.billing 
+GROUP BY billing.xact 
+ORDER BY max
+(billing.billing_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.transaction-payment-summary">transaction_payment_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.transaction_payment_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT payment_view.xact
+, last
+(payment_view.payment_type) AS last_payment_type
+, last
+(payment_view.note) AS last_payment_note
+, max
+(payment_view.payment_ts) AS last_payment_ts
+, sum
+(COALESCE
+     (payment_view.amount
+           , (0)::numeric
+     )
+) AS total_paid 
+FROM money.payment_view 
+WHERE (payment_view.voided IS FALSE)
+GROUP BY payment_view.xact 
+ORDER BY max
+(payment_view.payment_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.transaction-payment-with-void-summary">transaction_payment_with_void_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.transaction_payment_with_void_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_type</td>
+            	<td>name</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>last_payment_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT payment_view.xact
+, last
+(payment_view.payment_type) AS last_payment_type
+, last
+(payment_view.note) AS last_payment_note
+, max
+(payment_view.payment_ts) AS last_payment_ts
+, sum
+(CASE WHEN payment_view.voided THEN 
+     (0)::numeric ELSE COALESCE
+     (payment_view.amount
+           , (0)::numeric
+     ) END
+) AS total_paid 
+FROM money.payment_view 
+GROUP BY payment_view.xact 
+ORDER BY max
+(payment_view.payment_ts);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.usr-circulation-summary">usr_circulation_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.usr_circulation_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billable_xact_summary.usr
+, sum
+(billable_xact_summary.total_paid) AS total_paid
+, sum
+(billable_xact_summary.total_owed) AS total_owed
+, sum
+(billable_xact_summary.balance_owed) AS balance_owed 
+FROM money.billable_xact_summary 
+WHERE (billable_xact_summary.xact_type = &#39;circulation&#39;::name)
+GROUP BY billable_xact_summary.usr;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#money.schema">money</a>.<a name="money.view.usr-summary">usr_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.usr_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total_paid</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>total_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>balance_owed</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT billable_xact_summary.usr
+, sum
+(billable_xact_summary.total_paid) AS total_paid
+, sum
+(billable_xact_summary.total_owed) AS total_owed
+, sum
+(billable_xact_summary.balance_owed) AS balance_owed 
+FROM money.billable_xact_summary 
+GROUP BY billable_xact_summary.usr;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#money.schema">money</a>.<a name="money.table.work-payment">work_payment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>money.work_payment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;money.payment_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>payment_ts</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>amount_collected</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>accepting_usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table money.work_payment Inherits
+        
+            
+           <a href="#money.table.bnm-payment">bnm_payment</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       money_work_id_idx id
+    
+       money_work_payment_accepting_usr_idx accepting_usr
+    
+       money_work_payment_payment_ts_idx payment_ts
+    
+       money_work_payment_xact_idx xact
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#money.schema">Schema money</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.mat-summary-create">mat_summary_create()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	INSERT INTO money.materialized_billable_xact_summary (id, usr, xact_start, xact_finish, total_paid, total_owed, balance_owed)
+		VALUES ( NEW.id, NEW.usr, NEW.xact_start, NEW.xact_finish, 0.0, 0.0, 0.0);
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.mat-summary-delete">mat_summary_delete()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	DELETE FROM money.materialized_billable_xact_summary WHERE id = OLD.id;
+	RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.mat-summary-update">mat_summary_update()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	UPDATE	money.materialized_billable_xact_summary
+	  SET	usr = NEW.usr,
+		xact_start = NEW.xact_start,
+		xact_finish = NEW.xact_finish
+	  WHERE	id = NEW.id;
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-billing-add">materialized_summary_billing_add()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	IF NOT NEW.voided THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_owed = total_owed + NEW.amount,
+			last_billing_ts = NEW.billing_ts,
+			last_billing_note = NEW.note,
+			last_billing_type = NEW.billing_type,
+			balance_owed = balance_owed + NEW.amount
+		  WHERE	id = NEW.xact;
+	END IF;
+
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-billing-del">materialized_summary_billing_del()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	prev_billing	money.billing%ROWTYPE;
+	old_billing	money.billing%ROWTYPE;
+BEGIN
+	SELECT * INTO prev_billing FROM money.billing WHERE xact = OLD.xact AND NOT voided ORDER BY billing_ts DESC LIMIT 1 OFFSET 1;
+	SELECT * INTO old_billing FROM money.billing WHERE xact = OLD.xact AND NOT voided ORDER BY billing_ts DESC LIMIT 1;
+
+	IF OLD.id = old_billing.id THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	last_billing_ts = prev_billing.billing_ts,
+			last_billing_note = prev_billing.note,
+			last_billing_type = prev_billing.billing_type
+		  WHERE	id = NEW.xact;
+	END IF;
+
+	IF NOT OLD.voided THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_owed = total_owed - OLD.amount,
+			balance_owed = balance_owed + OLD.amount
+		  WHERE	id = OLD.xact;
+	END IF;
+
+	RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-billing-update">materialized_summary_billing_update()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	old_billing	money.billing%ROWTYPE;
+	old_voided	money.billing%ROWTYPE;
+BEGIN
+
+	SELECT * INTO old_billing FROM money.billing WHERE xact = NEW.xact AND NOT voided ORDER BY billing_ts DESC LIMIT 1;
+	SELECT * INTO old_voided FROM money.billing WHERE xact = NEW.xact ORDER BY billing_ts DESC LIMIT 1;
+
+	IF NEW.voided AND NOT OLD.voided THEN
+		IF OLD.id = old_voided.id THEN
+			UPDATE	money.materialized_billable_xact_summary
+			  SET	last_billing_ts = old_billing.billing_ts,
+				last_billing_note = old_billing.note,
+				last_billing_type = old_billing.billing_type
+			  WHERE	id = OLD.xact;
+		END IF;
+
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_owed = total_owed - NEW.amount,
+			balance_owed = balance_owed - NEW.amount
+		  WHERE	id = NEW.xact;
+
+	ELSIF NOT NEW.voided AND OLD.voided THEN
+
+		IF OLD.id = old_billing.id THEN
+			UPDATE	money.materialized_billable_xact_summary
+			  SET	last_billing_ts = old_billing.billing_ts,
+				last_billing_note = old_billing.note,
+				last_billing_type = old_billing.billing_type
+			  WHERE	id = OLD.xact;
+		END IF;
+
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_owed = total_owed + NEW.amount,
+			balance_owed = balance_owed + NEW.amount
+		  WHERE	id = NEW.xact;
+
+	ELSE
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_owed = total_owed - (OLD.amount - NEW.amount),
+			balance_owed = balance_owed - (OLD.amount - NEW.amount)
+		  WHERE	id = NEW.xact;
+	END IF;
+
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-payment-add">materialized_summary_payment_add()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	IF NOT NEW.voided THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_paid = total_paid + NEW.amount,
+			last_payment_ts = NEW.payment_ts,
+			last_payment_note = NEW.note,
+			last_payment_type = TG_ARGV[0],
+			balance_owed = balance_owed - NEW.amount
+		  WHERE	id = NEW.xact;
+	END IF;
+
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-payment-del">materialized_summary_payment_del()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	prev_payment	money.payment_view%ROWTYPE;
+	old_payment	money.payment_view%ROWTYPE;
+BEGIN
+	SELECT * INTO prev_payment FROM money.payment_view WHERE xact = OLD.xact AND NOT voided ORDER BY payment_ts DESC LIMIT 1 OFFSET 1;
+	SELECT * INTO old_payment FROM money.payment_view WHERE xact = OLD.xact AND NOT voided ORDER BY payment_ts DESC LIMIT 1;
+
+	IF OLD.id = old_payment.id THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	last_payment_ts = prev_payment.payment_ts,
+			last_payment_note = prev_payment.note,
+			last_payment_type = prev_payment.payment_type
+		  WHERE	id = OLD.xact;
+	END IF;
+
+	IF NOT OLD.voided THEN
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_paid = total_paid - OLD.amount,
+			balance_owed = balance_owed + OLD.amount
+		  WHERE	id = OLD.xact;
+	END IF;
+
+	RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#money.schema">money</a>.<a name="money.function.materialized-summary-payment-update">materialized_summary_payment_update()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	old_payment	money.payment_view%ROWTYPE;
+	old_voided	money.payment_view%ROWTYPE;
+BEGIN
+
+	SELECT * INTO old_payment FROM money.payment_view WHERE xact = NEW.xact AND NOT voided ORDER BY payment_ts DESC LIMIT 1;
+	SELECT * INTO old_voided FROM money.payment_view WHERE xact = NEW.xact ORDER BY payment_ts DESC LIMIT 1;
+
+	IF NEW.voided AND NOT OLD.voided THEN
+		IF OLD.id = old_voided.id THEN
+			UPDATE	money.materialized_billable_xact_summary
+			  SET	last_payment_ts = old_payment.payment_ts,
+				last_payment_note = old_payment.note,
+				last_payment_type = old_payment.payment_type
+			  WHERE	id = OLD.xact;
+		END IF;
+
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_paid = total_paid - NEW.amount,
+			balance_owed = balance_owed + NEW.amount
+		  WHERE	id = NEW.xact;
+
+	ELSIF NOT NEW.voided AND OLD.voided THEN
+
+		IF OLD.id = old_payment.id THEN
+			UPDATE	money.materialized_billable_xact_summary
+			  SET	last_payment_ts = old_payment.payment_ts,
+				last_payment_note = old_payment.note,
+				last_payment_type = old_payment.payment_type
+			  WHERE	id = OLD.xact;
+		END IF;
+
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_paid = total_paid + NEW.amount,
+			balance_owed = balance_owed - NEW.amount
+		  WHERE	id = NEW.xact;
+
+	ELSE
+		UPDATE	money.materialized_billable_xact_summary
+		  SET	total_paid = total_paid - (OLD.amount - NEW.amount),
+			balance_owed = balance_owed + (OLD.amount - NEW.amount)
+		  WHERE	id = NEW.xact;
+	END IF;
+
+	RETURN NEW;
+END;
+</pre>
+	
+
+<!-- offlineoffline -->
+
+		
+		<hr>
+		<h1>Schema offline</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#offline.schema">offline</a>.<a name="offline.table.script">script</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>offline.script Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>session</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>requestor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>workstation</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>logfile</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>time_delta</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>count</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       offline_script_pkey id
+    
+       offline_script_session session
+    
+       offline_script_ws workstation
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#offline.schema">Schema offline</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#offline.schema">offline</a>.<a name="offline.table.session">session</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>offline.session Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>key</td>
+            	<td>text</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>org</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>in_process</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>start_time</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>end_time</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>num_complete</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       offline_session_creation create_time
+    
+       offline_session_org org
+    
+       offline_session_pkey key
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#offline.schema">Schema offline</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- permissionpermission -->
+
+		
+		<hr>
+		<h1>Schema permission</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.grp-penalty-threshold">grp_penalty_threshold</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.grp_penalty_threshold Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>org_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#config.table.standing-penalty">config.standing_penalty.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>penalty</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>threshold</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.grp-perm-map">grp_perm_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.grp_perm_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#permission.table.perm-list">permission.perm_list.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>perm</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>depth</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>grantable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.grp-tree">grp_tree</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.grp_tree Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                </td>
+            	<td>parent</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usergroup</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>perm_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;3 years&#39;::interval
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>application_perm</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#actor.table.usr">actor.usr</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.circ-matrix-matchpoint">config.circ_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#config.table.hold-matrix-matchpoint">config.hold_matrix_matchpoint</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.grp-penalty-threshold">permission.grp_penalty_threshold</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.grp-perm-map">permission.grp_perm_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.grp-tree">permission.grp_tree</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-grp-map">permission.usr_grp_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       grp_tree_parent_idx parent
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.perm-list">perm_list</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.perm_list Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#permission.table.grp-perm-map">permission.grp_perm_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-object-perm-map">permission.usr_object_perm_map</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#permission.table.usr-perm-map">permission.usr_perm_map</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       perm_list_code_idx code
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.usr-grp-map">usr_grp_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.usr_grp_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#permission.table.grp-tree">permission.grp_tree.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>grp</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.usr-object-perm-map">usr_object_perm_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.usr_object_perm_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#permission.table.perm-list">permission.perm_list.id</a>
+                  
+                
+                </td>
+            	<td>perm</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>object_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>object_id</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>grantable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       uopm_usr_idx usr
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.usr-perm-map">usr_perm_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.usr_perm_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                  
+                  <a href="#permission.table.perm-list">permission.perm_list.id</a>
+                  
+                
+                </td>
+            	<td>perm</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>depth</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>grantable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#permission.schema">permission</a>.<a name="permission.table.usr-work-ou-map">usr_work_ou_map</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>permission.usr_work_ou_map Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>work_ou</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#permission.schema">Schema permission</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.grp-ancestors-integer">grp_ancestors(integer)</a>
+		</h2>
+<h3>Returns: SET OF grp_tree</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	a.*
+	FROM	connectby(&#39;permission.grp_tree&#39;::text,&#39;parent&#39;::text,&#39;id&#39;::text,&#39;name&#39;::text,$1::text,100,&#39;.&#39;::text)
+			AS t(keyid text, parent_keyid text, level int, branch text,pos int)
+		JOIN permission.grp_tree a ON a.id::text = t.keyid::text
+	ORDER BY
+		CASE WHEN a.parent IS NULL
+			THEN 0
+			ELSE 1
+		END, a.name;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-can-grant-perm-target-ou-integer-tperm-text-iuser-integer">usr_can_grant_perm(target_ou integer, tperm text, iuser integer)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	r_usr	actor.usr%ROWTYPE;
+	r_perm	permission.usr_perm_map%ROWTYPE;
+BEGIN
+
+	SELECT * INTO r_usr FROM actor.usr WHERE id = iuser;
+
+	IF r_usr.active = FALSE THEN
+		RETURN FALSE;
+	END IF;
+
+	IF r_usr.super_user = TRUE THEN
+		RETURN TRUE;
+	END IF;
+
+	FOR r_perm IN	SELECT	*
+			  FROM	permission.usr_perms(iuser) p
+				JOIN permission.perm_list l
+					ON (l.id = p.perm)
+			  WHERE	(l.code = tperm AND p.grantable IS TRUE)
+		LOOP
+
+		PERFORM	*
+		  FROM	actor.org_unit_descendants(target_ou,r_perm.depth)
+		  WHERE	id = r_usr.home_ou;
+
+		IF FOUND THEN
+			RETURN TRUE;
+		ELSE
+			RETURN FALSE;
+		END IF;
+	END LOOP;
+
+	RETURN FALSE;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-home-perm-target-ou-integer-tperm-text-iuser-integer">usr_has_home_perm(target_ou integer, tperm text, iuser integer)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	r_usr	actor.usr%ROWTYPE;
+	r_perm	permission.usr_perm_map%ROWTYPE;
+BEGIN
+
+	SELECT * INTO r_usr FROM actor.usr WHERE id = iuser;
+
+	IF r_usr.active = FALSE THEN
+		RETURN FALSE;
+	END IF;
+
+	IF r_usr.super_user = TRUE THEN
+		RETURN TRUE;
+	END IF;
+
+	FOR r_perm IN	SELECT	*
+			  FROM	permission.usr_perms(iuser) p
+				JOIN permission.perm_list l
+					ON (l.id = p.perm)
+			  WHERE	l.code = tperm
+			  	OR p.perm = -1 LOOP
+
+		PERFORM	*
+		  FROM	actor.org_unit_descendants(target_ou,r_perm.depth)
+		  WHERE	id = r_usr.home_ou;
+
+		IF FOUND THEN
+			RETURN TRUE;
+		ELSE
+			RETURN FALSE;
+		END IF;
+	END LOOP;
+
+	RETURN FALSE;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-object-perm-integer-text-text-text">usr_has_object_perm(integer, text, text, text)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT permission.usr_has_object_perm( $1, $2, $3, $4, -1 );
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-object-perm-target-ou-integer-obj-id-text-obj-type-text-tperm-text-iuser-integer">usr_has_object_perm(target_ou integer, obj_id text, obj_type text, tperm text, iuser integer)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	r_usr	actor.usr%ROWTYPE;
+	res     BOOL;
+BEGIN
+
+	SELECT * INTO r_usr FROM actor.usr WHERE id = iuser;
+
+	IF r_usr.active = FALSE THEN
+		RETURN FALSE;
+	END IF;
+
+	IF r_usr.super_user = TRUE THEN
+		RETURN TRUE;
+	END IF;
+
+	SELECT TRUE INTO res FROM permission.usr_object_perm_map WHERE usr = r_usr.id AND object_type = obj_type AND object_id = obj_id;
+
+	IF FOUND THEN
+		RETURN TRUE;
+	END IF;
+
+	IF target_ou &gt; -1 THEN
+		RETURN permission.usr_has_perm( iuser, tperm, target_ou);
+	END IF;
+
+	RETURN FALSE;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-perm-integer-text-integer">usr_has_perm(integer, text, integer)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	CASE
+			WHEN permission.usr_has_home_perm( $1, $2, $3 ) THEN TRUE
+			WHEN permission.usr_has_work_perm( $1, $2, $3 ) THEN TRUE
+			ELSE FALSE
+		END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-perm-at-perm-code-integer-user-id-text">usr_has_perm_at(perm_code integer, user_id text)</a>
+		</h2>
+<h3>Returns: SET OF integer</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+SELECT DISTINCT * FROM permission.usr_has_perm_at_nd( $1, $2 );
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-perm-at-all-perm-code-integer-user-id-text">usr_has_perm_at_all(perm_code integer, user_id text)</a>
+		</h2>
+<h3>Returns: SET OF integer</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+SELECT DISTINCT * FROM permission.usr_has_perm_at_all_nd( $1, $2 );
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-perm-at-all-nd-perm-code-integer-user-id-text">usr_has_perm_at_all_nd(perm_code integer, user_id text)</a>
+		</h2>
+<h3>Returns: SET OF integer</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+--
+-- Return a set of all the org units for which a given user has a given
+-- permission, granted either directly or through inheritance from a parent
+-- org unit.
+--
+-- The permissions apply to a minimum depth of the org unit hierarchy, and
+-- to the subordinates of those org units, for the org unit(s) to which the
+-- user is assigned.
+--
+-- For purposes of this function, the permission.usr_work_ou_map table
+-- assigns users to org units.  I.e. we ignore the home_ou column of actor.usr.
+--
+-- The result set may contain duplicates, which should be eliminated
+-- by a DISTINCT clause.
+--
+DECLARE
+	n_head_ou     INTEGER;
+	n_child_ou    INTEGER;
+BEGIN
+	FOR n_head_ou IN
+		SELECT DISTINCT * FROM permission.usr_has_perm_at_nd( user_id, perm_code )
+	LOOP
+		--
+		-- The permission applies only at a depth greater than the work org unit.
+		-- Use connectby() to find all dependent org units at the specified depth.
+		--
+		FOR n_child_ou IN
+			SELECT ou::INTEGER
+			FROM connectby( 
+					&#39;actor.org_unit&#39;,   -- table name
+					&#39;id&#39;,               -- key column
+					&#39;parent_ou&#39;,        -- recursive foreign key
+					n_head_ou::TEXT,    -- id of starting point
+					0                   -- no limit on search depth
+				)
+				AS t(
+					ou text,            -- dependent org unit
+					parent_ou text,     -- (ignore)
+					level int           -- (ignore)
+				)
+		LOOP
+			RETURN NEXT n_child_ou;
+		END LOOP;
+	END LOOP;
+	--
+	RETURN;
+	--
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-perm-at-nd-perm-code-integer-user-id-text">usr_has_perm_at_nd(perm_code integer, user_id text)</a>
+		</h2>
+<h3>Returns: SET OF integer</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+--
+-- Return a set of all the org units for which a given user has a given
+-- permission, granted directly (not through inheritance from a parent
+-- org unit).
+--
+-- The permissions apply to a minimum depth of the org unit hierarchy,
+-- for the org unit(s) to which the user is assigned.  (They also apply
+-- to the subordinates of those org units, but we don&#39;t report the
+-- subordinates here.)
+--
+-- For purposes of this function, the permission.usr_work_ou_map table
+-- defines which users belong to which org units.  I.e. we ignore the
+-- home_ou column of actor.usr.
+--
+-- The result set may contain duplicates, which should be eliminated
+-- by a DISTINCT clause.
+--
+DECLARE
+	b_super       BOOLEAN;
+	n_perm        INTEGER;
+	n_min_depth   INTEGER; 
+	n_work_ou     INTEGER;
+	n_curr_ou     INTEGER;
+	n_depth       INTEGER;
+	n_curr_depth  INTEGER;
+BEGIN
+	--
+	-- Check for superuser
+	--
+	SELECT INTO b_super
+		super_user
+	FROM
+		actor.usr
+	WHERE
+		id = user_id;
+	--
+	IF NOT FOUND THEN
+		return;				-- No user?  No permissions.
+	ELSIF b_super THEN
+		--
+		-- Super user has all permissions everywhere
+		--
+		FOR n_work_ou IN
+			SELECT
+				id
+			FROM
+				actor.org_unit
+			WHERE
+				parent_ou IS NULL
+		LOOP
+			RETURN NEXT n_work_ou; 
+		END LOOP;
+		RETURN;
+	END IF;
+	--
+	-- Translate the permission name
+	-- to a numeric permission id
+	--
+	SELECT INTO n_perm
+		id
+	FROM
+		permission.perm_list
+	WHERE
+		code = perm_code;
+	--
+	IF NOT FOUND THEN
+		RETURN;               -- No such permission
+	END IF;
+	--
+	-- Find the highest-level org unit (i.e. the minimum depth)
+	-- to which the permission is applied for this user
+	--
+	-- This query is modified from the one in permission.usr_perms().
+	--
+	SELECT INTO n_min_depth
+		min( depth )
+	FROM	(
+		SELECT depth 
+		  FROM permission.usr_perm_map upm
+		 WHERE upm.usr = user_id 
+		   AND upm.perm = n_perm
+       				UNION
+		SELECT	gpm.depth
+		  FROM	permission.grp_perm_map gpm
+		  WHERE	gpm.perm = n_perm 
+	        AND gpm.grp IN (
+	 		   SELECT	(permission.grp_ancestors(
+					(SELECT profile FROM actor.usr WHERE id = user_id)
+				)).id
+			)
+       				UNION
+		SELECT	p.depth
+		  FROM	permission.grp_perm_map p 
+		  WHERE p.perm = n_perm
+		    AND p.grp IN (
+		  		SELECT (permission.grp_ancestors(m.grp)).id 
+				FROM   permission.usr_grp_map m
+				WHERE  m.usr = user_id
+			)
+	) AS x;
+	--
+	IF NOT FOUND THEN
+		RETURN;                -- No such permission for this user
+	END IF;
+	--
+	-- Identify the org units to which the user is assigned.  Note that
+	-- we pay no attention to the home_ou column in actor.usr.
+	--
+	FOR n_work_ou IN
+		SELECT
+			work_ou
+		FROM
+			permission.usr_work_ou_map
+		WHERE
+			usr = user_id
+	LOOP            -- For each org unit to which the user is assigned
+		--
+		-- Determine the level of the org unit by a lookup in actor.org_unit_type.
+		-- We take it on faith that this depth agrees with the actual hierarchy
+		-- defined in actor.org_unit.
+		--
+		SELECT INTO n_depth
+		    type.depth
+		FROM
+		    actor.org_unit_type type
+		        INNER JOIN actor.org_unit ou
+		            ON ( ou.ou_type = type.id )
+		WHERE
+		    ou.id = n_work_ou;
+		--
+		IF NOT FOUND THEN
+			CONTINUE;        -- Maybe raise exception?
+		END IF;
+		--
+		-- Compare the depth of the work org unit to the
+		-- minimum depth, and branch accordingly
+		--
+		IF n_depth = n_min_depth THEN
+			--
+			-- The org unit is at the right depth, so return it.
+			--
+			RETURN NEXT n_work_ou;
+		ELSIF n_depth &gt; n_min_depth THEN
+			--
+			-- Traverse the org unit tree toward the root,
+			-- until you reach the minimum depth determined above
+			--
+			n_curr_depth := n_depth;
+			n_curr_ou := n_work_ou;
+			WHILE n_curr_depth &gt; n_min_depth LOOP
+				SELECT INTO n_curr_ou
+					parent_ou
+				FROM
+					actor.org_unit
+				WHERE
+					id = n_curr_ou;
+				--
+				IF FOUND THEN
+					n_curr_depth := n_curr_depth - 1;
+				ELSE
+					--
+					-- This can happen only if the hierarchy defined in
+					-- actor.org_unit is corrupted, or out of sync with
+					-- the depths defined in actor.org_unit_type.
+					-- Maybe we should raise an exception here, instead
+					-- of silently ignoring the problem.
+					--
+					n_curr_ou = NULL;
+					EXIT;
+				END IF;
+			END LOOP;
+			--
+			IF n_curr_ou IS NOT NULL THEN
+				RETURN NEXT n_curr_ou;
+			END IF;
+		ELSE
+			--
+			-- The permission applies only at a depth greater than the work org unit.
+			-- Use connectby() to find all dependent org units at the specified depth.
+			--
+			FOR n_curr_ou IN
+				SELECT ou::INTEGER
+				FROM connectby( 
+						&#39;actor.org_unit&#39;,         -- table name
+						&#39;id&#39;,                     -- key column
+						&#39;parent_ou&#39;,              -- recursive foreign key
+						n_work_ou::TEXT,          -- id of starting point
+						(n_min_depth - n_depth)   -- max depth to search, relative
+					)                             --   to starting point
+					AS t(
+						ou text,            -- dependent org unit
+						parent_ou text,     -- (ignore)
+						level int           -- depth relative to starting point
+					)
+				WHERE
+					level = n_min_depth - n_depth
+			LOOP
+				RETURN NEXT n_curr_ou;
+			END LOOP;
+		END IF;
+		--
+	END LOOP;
+	--
+	RETURN;
+	--
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-has-work-perm-target-ou-integer-tperm-text-iuser-integer">usr_has_work_perm(target_ou integer, tperm text, iuser integer)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	r_woum	permission.usr_work_ou_map%ROWTYPE;
+	r_usr	actor.usr%ROWTYPE;
+	r_perm	permission.usr_perm_map%ROWTYPE;
+BEGIN
+
+	SELECT * INTO r_usr FROM actor.usr WHERE id = iuser;
+
+	IF r_usr.active = FALSE THEN
+		RETURN FALSE;
+	END IF;
+
+	IF r_usr.super_user = TRUE THEN
+		RETURN TRUE;
+	END IF;
+
+	FOR r_perm IN	SELECT	*
+			  FROM	permission.usr_perms(iuser) p
+				JOIN permission.perm_list l
+					ON (l.id = p.perm)
+			  WHERE	l.code = tperm
+			  	OR p.perm = -1
+		LOOP
+
+		FOR r_woum IN	SELECT	*
+				  FROM	permission.usr_work_ou_map
+				  WHERE	usr = iuser
+			LOOP
+
+			PERFORM	*
+			  FROM	actor.org_unit_descendants(target_ou,r_perm.depth)
+			  WHERE	id = r_woum.work_ou;
+
+			IF FOUND THEN
+				RETURN TRUE;
+			END IF;
+
+		END LOOP;
+
+	END LOOP;
+
+	RETURN FALSE;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#permission.schema">permission</a>.<a name="permission.function.usr-perms-integer">usr_perms(integer)</a>
+		</h2>
+<h3>Returns: SET OF usr_perm_map</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT	DISTINCT ON (usr,perm) *
+	  FROM	(
+			(SELECT * FROM permission.usr_perm_map WHERE usr = $1)
+        				UNION ALL
+			(SELECT	-p.id, $1 AS usr, p.perm, p.depth, p.grantable
+			  FROM	permission.grp_perm_map p
+			  WHERE	p.grp IN (
+			  	SELECT	(permission.grp_ancestors(
+						(SELECT profile FROM actor.usr WHERE id = $1)
+					)).id
+				)
+			)
+        				UNION ALL
+			(SELECT	-p.id, $1 AS usr, p.perm, p.depth, p.grantable
+			  FROM	permission.grp_perm_map p 
+			  WHERE	p.grp IN (SELECT (permission.grp_ancestors(m.grp)).id FROM permission.usr_grp_map m WHERE usr = $1))
+		) AS x
+	  ORDER BY 2, 3, 1 DESC, 5 DESC ;
+</pre>
+	
+
+<!-- publicpublic -->
+
+		
+		<hr>
+		<h1>Schema public</h1>
+		
+			<p>standard public schema</p>
+		
+
+		
+		
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.-get-parser-from-curcfg">_get_parser_from_curcfg()</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>select prsname::text from pg_catalog.pg_ts_parser p join pg_ts_config c on cfgparser = p.oid where c.oid = show_curcfg();</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.agg-text-text">agg_text(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.agg-tsvector-tsvector">agg_tsvector(tsvector)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.array-accum-anyelement">array_accum(anyelement)</a>
+		</h2>
+<h3>Returns: anyarray</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.call-number-dewey-text">call_number_dewey(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+	my $txt = shift;
+	$txt =~ s/^\s+//o;
+	$txt =~ s/[\[\]\{\}\(\)`&#39;&quot;#&lt;&gt;\*\?\-\+\$\\]+//og;
+	$txt =~ s/\s+$//o;
+	if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
+		return $1;
+	} else {
+		return (split /\s+/, $txt)[0];
+	}
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.call-number-dewey-text-integer">call_number_dewey(text, integer)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT SUBSTRING(call_number_dewey($1) FROM 1 FOR $2);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.cleanup-acq-marc">cleanup_acq_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	IF TG_OP = &#39;UPDATE&#39; THEN
+		DELETE FROM acq.lineitem_attr
+	    		WHERE lineitem = OLD.id AND attr_type IN (&#39;lineitem_provider_attr_definition&#39;, &#39;lineitem_marc_attr_definition&#39;,&#39;lineitem_generated_attr_definition&#39;);
+		RETURN NEW;
+	ELSE
+		DELETE FROM acq.lineitem_attr WHERE lineitem = OLD.id;
+		RETURN OLD;
+	END IF;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.concat-tsvector-tsvector">concat(tsvector, tsvector)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsvector_concat</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.connectby-text-text-text-text-integer">connectby(text, text, text, text, integer)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>connectby_text</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.connectby-text-text-text-text-integer-text">connectby(text, text, text, text, integer, text)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>connectby_text</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.connectby-text-text-text-text-text-integer">connectby(text, text, text, text, text, integer)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>connectby_text_serial</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.connectby-text-text-text-text-text-integer-text">connectby(text, text, text, text, text, integer, text)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>connectby_text_serial</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab-text">crosstab(text)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab-text-integer">crosstab(text, integer)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab-text-text">crosstab(text, text)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab_hash</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab2-text">crosstab2(text)</a>
+		</h2>
+<h3>Returns: SET OF tablefunc_crosstab_2</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab3-text">crosstab3(text)</a>
+		</h2>
+<h3>Returns: SET OF tablefunc_crosstab_3</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.crosstab4-text">crosstab4(text)</a>
+		</h2>
+<h3>Returns: SET OF tablefunc_crosstab_4</h3>
+<h3>Language: C</h3>
+        
+        <pre>crosstab</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.dex-init-internal">dex_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_dex_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.dex-lexize-internal-internal-integer">dex_lexize(internal, internal, integer)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_dex_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.entityize-text">entityize(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    use Unicode::Normalize;
+
+    my $x = NFC(shift);
+    $x =~ s/([\x{0080}-\x{fffd}])/sprintf(&#39;&amp;#x%X;&#39;,ord($1))/sgoe;
+    return $x;
+
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.explode-array-anyarray">explode_array(anyarray)</a>
+		</h2>
+<h3>Returns: SET OF anyelement</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT ($1)[s] FROM generate_series(1, array_upper($1, 1)) AS s;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.extract-acq-marc-field-bigint-text-text">extract_acq_marc_field(bigint, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT public.extract_marc_field(&#39;acq.lineitem&#39;, $1, $2, $3);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.extract-marc-field-text-bigint-text">extract_marc_field(text, bigint, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT public.extract_marc_field($1,$2,$3,&#39;&#39;);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.extract-marc-field-text-bigint-text-text">extract_marc_field(text, bigint, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT regexp_replace(array_to_string( array_accum( output ),&#39; &#39; ),$4,&#39;&#39;,&#39;g&#39;) FROM xpath_table(&#39;id&#39;, &#39;marc&#39;, $1, $3, &#39;id=&#39;||$2)x(id INT, output TEXT);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.first-anyelement">first(anyelement)</a>
+		</h2>
+<h3>Returns: anyelement</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.first5-text">first5(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT SUBSTRING( $1, 1, 5);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.first-agg-anyelement-anyelement">first_agg(anyelement, anyelement)</a>
+		</h2>
+<h3>Returns: anyelement</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT CASE WHEN $1 IS NULL THEN $2 ELSE $1 END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.first-word-text">first_word(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+        SELECT SUBSTRING( $1 FROM $_$^\S+$_$);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.get-covers-tsvector-tsquery">get_covers(tsvector, tsquery)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_get_covers</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-oid-text-tsquery">headline(oid, text, tsquery)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_headline_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-oid-text-tsquery-text">headline(oid, text, tsquery, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_headline_byid_opt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-text-text-tsquery">headline(text, text, tsquery)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_headline_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-text-text-tsquery-text">headline(text, text, tsquery, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_headline_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-text-tsquery">headline(text, tsquery)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_headline</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.headline-text-tsquery-text">headline(text, tsquery, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_headline_opt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.ingest-acq-marc">ingest_acq_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+	value		TEXT;
+	atype		TEXT;
+	prov		INT;
+	adef		RECORD;
+	xpath_string	TEXT;
+BEGIN
+	FOR adef IN SELECT *,tableoid FROM acq.lineitem_attr_definition LOOP
+
+		SELECT relname::TEXT INTO atype FROM pg_class WHERE oid = adef.tableoid;
+
+		IF (atype NOT IN (&#39;lineitem_usr_attr_definition&#39;,&#39;lineitem_local_attr_definition&#39;)) THEN
+			IF (atype = &#39;lineitem_provider_attr_definition&#39;) THEN
+				SELECT provider INTO prov FROM acq.lineitem_provider_attr_definition WHERE id = adef.id;
+				CONTINUE WHEN NEW.provider IS NULL OR prov &lt;&gt; NEW.provider;
+			END IF;
+			
+			IF (atype = &#39;lineitem_provider_attr_definition&#39;) THEN
+				SELECT xpath INTO xpath_string FROM acq.lineitem_provider_attr_definition WHERE id = adef.id;
+			ELSIF (atype = &#39;lineitem_marc_attr_definition&#39;) THEN
+				SELECT xpath INTO xpath_string FROM acq.lineitem_marc_attr_definition WHERE id = adef.id;
+			ELSIF (atype = &#39;lineitem_generated_attr_definition&#39;) THEN
+				SELECT xpath INTO xpath_string FROM acq.lineitem_generated_attr_definition WHERE id = adef.id;
+			END IF;
+
+			SELECT extract_acq_marc_field(id, xpath_string, adef.remove) INTO value FROM acq.lineitem WHERE id = NEW.id;
+
+			IF (value IS NOT NULL AND value &lt;&gt; &#39;&#39;) THEN
+				INSERT INTO acq.lineitem_attr (lineitem, definition, attr_type, attr_name, attr_value)
+					VALUES (NEW.id, adef.id, atype, adef.code, value);
+			END IF;
+
+		END IF;
+
+	END LOOP;
+
+	RETURN NULL;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.last-anyelement">last(anyelement)</a>
+		</h2>
+<h3>Returns: anyelement</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.last-agg-anyelement-anyelement">last_agg(anyelement, anyelement)</a>
+		</h2>
+<h3>Returns: anyelement</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT $2;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.length-tsvector">length(tsvector)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsvector_length</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.lexize-oid-text">lexize(oid, text)</a>
+		</h2>
+<h3>Returns: text[]</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.lexize-text">lexize(text)</a>
+		</h2>
+<h3>Returns: text[]</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_lexize_bycurrent</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.lexize-text-text">lexize(text, text)</a>
+		</h2>
+<h3>Returns: text[]</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_lexize_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.lowercase-text">lowercase(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    return lc(shift);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.naco-normalize-text">naco_normalize(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+	SELECT public.naco_normalize($1,&#39;&#39;);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.naco-normalize-text-text">naco_normalize(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    use Unicode::Normalize;
+
+	my $txt = lc(shift);
+	my $sf = shift;
+
+    $txt = NFD($txt);
+	$txt =~ s/\pM+//go;	# Remove diacritics
+
+	$txt =~ s/\xE6/AE/go;	# Convert ae digraph
+	$txt =~ s/\x{153}/OE/go;# Convert oe digraph
+	$txt =~ s/\xFE/TH/go;	# Convert Icelandic thorn
+
+	$txt =~ tr/\x{2070}\x{2071}\x{2072}\x{2073}\x{2074}\x{2075}\x{2076}\x{2077}\x{2078}\x{2079}\x{207A}\x{207B}/0123456789+-/;# Convert superscript numbers
+	$txt =~ tr/\x{2080}\x{2081}\x{2082}\x{2083}\x{2084}\x{2085}\x{2086}\x{2087}\x{2088}\x{2089}\x{208A}\x{208B}/0123456889+-/;# Convert subscript numbers
+
+	$txt =~ tr/\x{0251}\x{03B1}\x{03B2}\x{0262}\x{03B3}/AABGG/;	 	# Convert Latin and Greek
+	$txt =~ tr/\x{2113}\xF0\!\&quot;\(\)\-\{\}\&lt;\&gt;\;\:\.\?\xA1\xBF\/\\\@\*\%\=\xB1\+\xAE\xA9\x{2117}\$\xA3\x{FFE1}\xB0\^\_\~\`/LD /;	# Convert Misc
+	$txt =~ tr/\&#39;\[\]\|//d;							# Remove Misc
+
+	if ($sf &amp;&amp; $sf =~ /^a/o) {
+		my $commapos = index($txt,&#39;,&#39;);
+		if ($commapos &gt; -1) {
+			if ($commapos != length($txt) - 1) {
+				my @list = split /,/, $txt;
+				my $first = shift @list;
+				$txt = $first . &#39;,&#39; . join(&#39; &#39;, @list);
+			} else {
+				$txt =~ s/,/ /go;
+			}
+		}
+	} else {
+		$txt =~ s/,/ /go;
+	}
+
+	$txt =~ s/\s+/ /go;	# Compress multiple spaces
+	$txt =~ s/^\s+//o;	# Remove leading space
+	$txt =~ s/\s+$//o;	# Remove trailing space
+
+	return $txt;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.non-filing-normalize-text-char">non_filing_normalize(text, &quot;char&quot;)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+        SELECT  SUBSTRING(
+                        REGEXP_REPLACE(
+                                REGEXP_REPLACE(
+                                        $1,
+                                        E&#39;\W*$&#39;,
+					&#39;&#39;
+				),
+                                &#39;  &#39;,
+                                &#39; &#39;
+                        ),
+                        CASE
+				WHEN $2::INT NOT BETWEEN 48 AND 57 THEN 1
+				ELSE $2::TEXT::INT + 1
+			END
+		);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.normal-rand-integer-double-precision-double-precision">normal_rand(integer, double precision, double precision)</a>
+		</h2>
+<h3>Returns: SET OF double precision</h3>
+<h3>Language: C</h3>
+        
+        <pre>normal_rand</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.normalize-space-text">normalize_space(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT regexp_replace(regexp_replace(regexp_replace($1, E&#39;\\n&#39;, &#39; &#39;, &#39;g&#39;), E&#39;(?:^\\s+)|(\\s+$)&#39;, &#39;&#39;, &#39;g&#39;), E&#39;\\s+&#39;, &#39; &#39;, &#39;g&#39;);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.numnode-tsquery">numnode(tsquery)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_numnode</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.oils-i18n-gettext-integer-text-text-text">oils_i18n_gettext(integer, text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT $2;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.oils-i18n-gettext-text-text-text-text">oils_i18n_gettext(text, text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT $2;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.oils-i18n-xlate-raw-locale-text-keyvalue-text-identcol-text-keycol-text-keyclass-text-keytable-text">oils_i18n_xlate(raw_locale text, keyvalue text, identcol text, keycol text, keyclass text, keytable text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    locale      TEXT := REGEXP_REPLACE( REGEXP_REPLACE( raw_locale, E&#39;[;, ].+$&#39;, &#39;&#39; ), E&#39;_&#39;, &#39;-&#39;, &#39;g&#39; );
+    language    TEXT := REGEXP_REPLACE( locale, E&#39;-.+$&#39;, &#39;&#39; );
+    result      config.i18n_core%ROWTYPE;
+    fallback    TEXT;
+    keyfield    TEXT := keyclass || &#39;.&#39; || keycol;
+BEGIN
+
+    -- Try the full locale
+    SELECT  * INTO result
+      FROM  config.i18n_core
+      WHERE fq_field = keyfield
+            AND identity_value = keyvalue
+            AND translation = locale;
+
+    -- Try just the language
+    IF NOT FOUND THEN
+        SELECT  * INTO result
+          FROM  config.i18n_core
+          WHERE fq_field = keyfield
+                AND identity_value = keyvalue
+                AND translation = language;
+    END IF;
+
+    -- Fall back to the string we passed in in the first place
+    IF NOT FOUND THEN
+	EXECUTE
+            &#39;SELECT &#39; ||
+                keycol ||
+            &#39; FROM &#39; || keytable ||
+            &#39; WHERE &#39; || identcol || &#39; = &#39; || quote_literal(keyvalue)
+                INTO fallback;
+        RETURN fallback;
+    END IF;
+
+    RETURN result.string;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.oils-tsearch2">oils_tsearch2()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+	NEW.index_vector = to_tsvector((TG_ARGV[0])::regconfig, NEW.value);
+	RETURN NEW;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.parse-oid-text">parse(oid, text)</a>
+		</h2>
+<h3>Returns: SET OF tokenout</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_parse_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.parse-text">parse(text)</a>
+		</h2>
+<h3>Returns: SET OF tokenout</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_parse_current</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.parse-text-text">parse(text, text)</a>
+		</h2>
+<h3>Returns: SET OF tokenout</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_parse_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.plainto-tsquery-oid-text">plainto_tsquery(oid, text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>plainto_tsquery_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.plainto-tsquery-text">plainto_tsquery(text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>plainto_tsquery</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.plainto-tsquery-text-text">plainto_tsquery(text, text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_plainto_tsquery_name</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.prsd-end-internal">prsd_end(internal)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_prsd_end</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.prsd-getlexeme-internal-internal-internal">prsd_getlexeme(internal, internal, internal)</a>
+		</h2>
+<h3>Returns: integer</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_prsd_getlexeme</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.prsd-headline-internal-internal-internal">prsd_headline(internal, internal, internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_prsd_headline</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.prsd-lextype-internal">prsd_lextype(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_prsd_lextype</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.prsd-start-internal-integer">prsd_start(internal, integer)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_prsd_start</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.querytree-tsquery">querytree(tsquery)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquerytree</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-realARRAY-tsvector-tsquery">rank(real[], tsvector, tsquery)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rank_wtt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-realARRAY-tsvector-tsquery-integer">rank(real[], tsvector, tsquery, integer)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rank_wttf</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-tsvector-tsquery">rank(tsvector, tsquery)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rank_tt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-tsvector-tsquery-integer">rank(tsvector, tsquery, integer)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rank_ttf</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-cd-realARRAY-tsvector-tsquery">rank_cd(real[], tsvector, tsquery)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rankcd_wtt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-cd-realARRAY-tsvector-tsquery-integer">rank_cd(real[], tsvector, tsquery, integer)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rankcd_wttf</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-cd-tsvector-tsquery">rank_cd(tsvector, tsquery)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rankcd_tt</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rank-cd-tsvector-tsquery-integer">rank_cd(tsvector, tsquery, integer)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_rankcd_ttf</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.remove-diacritics-text">remove_diacritics(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    use Unicode::Normalize;
+
+    my $x = NFD(shift);
+    $x =~ s/\pM+//go;
+    return $x;
+
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.reset-tsearch">reset_tsearch()</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_reset_tsearch</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rewrite-tsquery-text">rewrite(tsquery, text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_rewrite_query</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rewrite-tsquery-tsquery-tsquery">rewrite(tsquery, tsquery, tsquery)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_rewrite</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rewrite-tsqueryARRAY">rewrite(tsquery[])</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>aggregate_dummy</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rewrite-accum-tsquery-tsqueryARRAY">rewrite_accum(tsquery, tsquery[])</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_rewrite_accum</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.rewrite-finish-tsquery">rewrite_finish(tsquery)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_rewrite_finish</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curcfg-integer">set_curcfg(integer)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curcfg</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curcfg-text">set_curcfg(text)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curcfg_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curdict-integer">set_curdict(integer)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curdict</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curdict-text">set_curdict(text)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curdict_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curprs-integer">set_curprs(integer)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curprs</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.set-curprs-text">set_curprs(text)</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_set_curprs_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.setweight-tsvector-char">setweight(tsvector, &quot;char&quot;)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsvector_setweight</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.show-curcfg">show_curcfg()</a>
+		</h2>
+<h3>Returns: oid</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>get_current_ts_config</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.snb-en-init-internal">snb_en_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_snb_en_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.snb-lexize-internal-internal-integer">snb_lexize(internal, internal, integer)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_snb_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.snb-ru-init-internal">snb_ru_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_snb_ru_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.snb-ru-init-koi8-internal">snb_ru_init_koi8(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_snb_ru_init_koi8</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.snb-ru-init-utf8-internal">snb_ru_init_utf8(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_snb_ru_init_utf8</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.spell-init-internal">spell_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_spell_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.spell-lexize-internal-internal-integer">spell_lexize(internal, internal, integer)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_spell_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.stat-text">stat(text)</a>
+		</h2>
+<h3>Returns: SET OF statinfo</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_stat1</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.stat-text-text">stat(text, text)</a>
+		</h2>
+<h3>Returns: SET OF statinfo</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_stat2</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.strip-tsvector">strip(tsvector)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsvector_strip</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.syn-init-internal">syn_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_syn_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.syn-lexize-internal-internal-integer">syn_lexize(internal, internal, integer)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_syn_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tableoid2name-oid">tableoid2name(oid)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+	BEGIN
+		RETURN $1::regclass;
+	END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.text-concat-text-text">text_concat(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+SELECT
+	CASE	WHEN $1 IS NULL
+			THEN $2
+		WHEN $2 IS NULL
+			THEN $1
+		ELSE $1 || &#39; &#39; || $2
+	END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.thesaurus-init-internal">thesaurus_init(internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_thesaurus_init</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.thesaurus-lexize-internal-internal-integer-internal">thesaurus_lexize(internal, internal, integer, internal)</a>
+		</h2>
+<h3>Returns: internal</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_thesaurus_lexize</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsquery-oid-text">to_tsquery(oid, text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>to_tsquery_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsquery-text">to_tsquery(text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>to_tsquery</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsquery-text-text">to_tsquery(text, text)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_to_tsquery_name</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsvector-oid-text">to_tsvector(oid, text)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>to_tsvector_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsvector-text">to_tsvector(text)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>to_tsvector</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.to-tsvector-text-text">to_tsvector(text, text)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_to_tsvector_name</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.token-type">token_type()</a>
+		</h2>
+<h3>Returns: SET OF tokentype</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_token_type_current</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.token-type-integer">token_type(integer)</a>
+		</h2>
+<h3>Returns: SET OF tokentype</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_token_type_byid</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.token-type-text">token_type(text)</a>
+		</h2>
+<h3>Returns: SET OF tokentype</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>ts_token_type_byname</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.ts-debug-text">ts_debug(text)</a>
+		</h2>
+<h3>Returns: SET OF tsdebug</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+select
+        (select c.cfgname::text from pg_catalog.pg_ts_config as c
+         where c.oid = show_curcfg()),
+        t.alias as tok_type,
+        t.descr as description,
+        p.token,
+        ARRAY ( SELECT m.mapdict::pg_catalog.regdictionary::pg_catalog.text
+                FROM pg_catalog.pg_ts_config_map AS m
+                WHERE m.mapcfg = show_curcfg() AND m.maptokentype = p.tokid
+                ORDER BY m.mapseqno )
+        AS dict_name,
+        strip(to_tsvector(p.token)) as tsvector
+from
+        parse( _get_parser_from_curcfg(), $1 ) as p,
+        token_type() as t
+where
+        t.tokid = p.tokid
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsearch2">tsearch2()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: C</h3>
+        
+        <pre>tsa_tsearch2</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsq-mcontained-tsquery-tsquery">tsq_mcontained(tsquery, tsquery)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsq_mcontained</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsq-mcontains-tsquery-tsquery">tsq_mcontains(tsquery, tsquery)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsq_mcontains</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsquery-and-tsquery-tsquery">tsquery_and(tsquery, tsquery)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_and</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsquery-not-tsquery">tsquery_not(tsquery)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_not</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsquery-or-tsquery-tsquery">tsquery_or(tsquery, tsquery)</a>
+		</h2>
+<h3>Returns: tsquery</h3>
+<h3>Language: INTERNAL</h3>
+        
+        <pre>tsquery_or</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.tsvector-concat-tsvector-tsvector">tsvector_concat(tsvector, tsvector)</a>
+		</h2>
+<h3>Returns: tsvector</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+SELECT
+	CASE	WHEN $1 IS NULL
+			THEN $2
+		WHEN $2 IS NULL
+			THEN $1
+		ELSE $1 || &#39; &#39; || $2
+	END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.uppercase-text">uppercase(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    return uc(shift);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xml-encode-special-chars-text">xml_encode_special_chars(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xml_encode_special_chars</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xml-is-well-formed-text">xml_is_well_formed(text)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: C</h3>
+        
+        <pre>xml_is_well_formed</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xml-valid-text">xml_valid(text)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: C</h3>
+        
+        <pre>xml_is_well_formed</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-bool-text-text">xpath_bool(text, text)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_bool</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-list-text-text">xpath_list(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>SELECT xpath_list($1,$2,&#39;,&#39;)</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-list-text-text-text">xpath_list(text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_list</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-nodeset-text-text">xpath_nodeset(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>SELECT xpath_nodeset($1,$2,&#39;&#39;,&#39;&#39;)</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-nodeset-text-text-text">xpath_nodeset(text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>SELECT xpath_nodeset($1,$2,&#39;&#39;,$3)</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-nodeset-text-text-text-text">xpath_nodeset(text, text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_nodeset</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-number-text-text">xpath_number(text, text)</a>
+		</h2>
+<h3>Returns: real</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_number</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-string-text-text">xpath_string(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_string</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xpath-table-text-text-text-text-text">xpath_table(text, text, text, text, text)</a>
+		</h2>
+<h3>Returns: SET OF record</h3>
+<h3>Language: C</h3>
+        
+        <pre>xpath_table</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xslt-process-text-text">xslt_process(text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xslt_process</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#public.schema">public</a>.<a name="public.function.xslt-process-text-text-text">xslt_process(text, text, text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: C</h3>
+        
+        <pre>xslt_process</pre>
+	
+
+<!-- reporterreporter -->
+
+		
+		<hr>
+		<h1>Schema reporter</h1>
+		
+
+		
+		
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.circ-type">circ_type</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.circ_type Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT circulation.id
+, CASE WHEN 
+(
+     (circulation.opac_renewal 
+          OR circulation.phone_renewal
+     )
+    OR circulation.desk_renewal
+) THEN &#39;RENEWAL&#39;::text ELSE &#39;CHECKOUT&#39;::text END AS type 
+FROM action.circulation;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.currently-running">currently_running</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.currently_running Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>runner_barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>run_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>scheduled_wait_time</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT s.id
+, c.barcode AS runner_barcode
+, r.name
+, s.run_time
+, (s.run_time - now
+     ()
+) AS scheduled_wait_time 
+FROM (
+     (
+           (reporter.schedule s 
+              JOIN reporter.report r 
+                ON (
+                       (r.id = s.report)
+                 )
+           )
+        JOIN actor.usr u 
+          ON (
+                 (s.runner = u.id)
+           )
+     )
+  JOIN actor.card c 
+    ON (
+           (c.id = u.card)
+     )
+)
+WHERE (
+     (s.start_time IS NOT NULL)
+   AND (s.complete_time IS NULL)
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.demographic">demographic</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.demographic Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dob</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>general_division</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT u.id
+, u.dob
+, CASE WHEN 
+(u.dob IS NULL) THEN &#39;Adult&#39;::text WHEN 
+(age
+     (u.dob) &gt; &#39;18 years&#39;::interval
+) THEN &#39;Adult&#39;::text ELSE &#39;Juvenile&#39;::text END AS general_division 
+FROM actor.usr u;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.hold-request-record">hold_request_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.hold_request_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>hold_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>bib_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT ahr.id
+, ahr.target
+, ahr.hold_type
+, CASE WHEN 
+(ahr.hold_type = &#39;T&#39;::text) THEN ahr.target WHEN 
+(ahr.hold_type = &#39;V&#39;::text) THEN 
+(
+SELECT cn.record 
+  FROM asset.call_number cn 
+ WHERE (cn.id = ahr.target)
+) WHEN 
+(ahr.hold_type = &#39;C&#39;::text) THEN 
+(
+SELECT cn.record 
+  FROM (asset.call_number cn 
+        JOIN asset.copy cp 
+          ON (
+                 (cn.id = cp.call_number)
+           )
+     )
+ WHERE (cp.id = ahr.target)
+) WHEN 
+(ahr.hold_type = &#39;M&#39;::text) THEN 
+(
+SELECT mr.master_record 
+  FROM metabib.metarecord mr 
+ WHERE (mr.id = ahr.target)
+) ELSE NULL::bigint END AS bib_record 
+FROM action.hold_request ahr;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.materialized-simple-record">materialized_simple_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.materialized_simple_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>publisher</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pubdate</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>isbn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>issn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.old-super-simple-record">old_super_simple_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.old_super_simple_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>publisher</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pubdate</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>isbn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>issn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT r.id
+, r.fingerprint
+, r.quality
+, r.tcn_source
+, r.tcn_value
+, title.value AS title
+, first
+(author.value) AS author
+, publisher.value AS publisher
+,&quot;substring&quot;
+(pubdate.value
+     ,&#39;\\d+&#39;::text
+) AS pubdate
+, array_accum
+(&quot;substring&quot;
+     (isbn.value
+           ,&#39;^\\S+&#39;::text
+     )
+) AS isbn
+, array_accum
+(&quot;substring&quot;
+     (issn.value
+           ,&#39;^\\S+&#39;::text
+     )
+) AS issn 
+FROM (
+     (
+           (
+                 (
+                       (
+                             (biblio.record_entry r 
+                           LEFT JOIN metabib.full_rec title 
+                                  ON (
+                                         (
+                                               (
+                                                     (r.id = title.record)
+                                                   AND (title.tag = &#39;245&#39;::bpchar)
+                                               )
+                                             AND (title.subfield = &#39;a&#39;::text)
+                                         )
+                                   )
+                             )
+                     LEFT JOIN metabib.full_rec author 
+                            ON (
+                                   (
+                                         (
+                                               (r.id = author.record)
+                                             AND (author.tag = ANY 
+                                                     (ARRAY[&#39;100&#39;::bpchar
+                                                           ,&#39;110&#39;::bpchar
+                                                           ,&#39;111&#39;::bpchar]
+                                                     )
+                                               )
+                                         )
+                                       AND (author.subfield = &#39;a&#39;::text)
+                                   )
+                             )
+                       )
+               LEFT JOIN metabib.full_rec publisher 
+                      ON (
+                             (
+                                   (
+                                         (r.id = publisher.record)
+                                       AND (publisher.tag = &#39;260&#39;::bpchar)
+                                   )
+                                 AND (publisher.subfield = &#39;b&#39;::text)
+                             )
+                       )
+                 )
+         LEFT JOIN metabib.full_rec pubdate 
+                ON (
+                       (
+                             (
+                                   (r.id = pubdate.record)
+                                 AND (pubdate.tag = &#39;260&#39;::bpchar)
+                             )
+                           AND (pubdate.subfield = &#39;c&#39;::text)
+                       )
+                 )
+           )
+   LEFT JOIN metabib.full_rec isbn 
+          ON (
+                 (
+                       (
+                             (r.id = isbn.record)
+                           AND (isbn.tag = ANY 
+                                   (ARRAY[&#39;024&#39;::bpchar
+                                         ,&#39;020&#39;::bpchar]
+                                   )
+                             )
+                       )
+                     AND (isbn.subfield = ANY 
+                             (ARRAY[&#39;a&#39;::text
+                                   ,&#39;z&#39;::text]
+                             )
+                       )
+                 )
+           )
+     )
+LEFT JOIN metabib.full_rec issn 
+    ON (
+           (
+                 (
+                       (r.id = issn.record)
+                     AND (issn.tag = &#39;022&#39;::bpchar)
+                 )
+               AND (issn.subfield = &#39;a&#39;::text)
+           )
+     )
+)
+GROUP BY r.id
+, r.fingerprint
+, r.quality
+, r.tcn_source
+, r.tcn_value
+, title.value
+, publisher.value
+,&quot;substring&quot;
+(pubdate.value
+     ,&#39;\\d+&#39;::text
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.output-folder">output_folder</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.output_folder Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.output-folder">reporter.output_folder.id</a>
+                  
+                
+                </td>
+            	<td>parent</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>shared</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>share_with</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#reporter.table.output-folder">reporter.output_folder</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.schedule">reporter.schedule</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       rpt_output_fldr_owner_idx owner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.overdue-circs">overdue_circs</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.overdue_circs Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT circulation.id
+, circulation.usr
+, circulation.xact_start
+, circulation.xact_finish
+, circulation.unrecovered
+, circulation.target_copy
+, circulation.circ_lib
+, circulation.circ_staff
+, circulation.checkin_staff
+, circulation.checkin_lib
+, circulation.renewal_remaining
+, circulation.due_date
+, circulation.stop_fines_time
+, circulation.checkin_time
+, circulation.create_time
+, circulation.duration
+, circulation.fine_interval
+, circulation.recuring_fine
+, circulation.max_fine
+, circulation.phone_renewal
+, circulation.desk_renewal
+, circulation.opac_renewal
+, circulation.duration_rule
+, circulation.recuring_fine_rule
+, circulation.max_fine_rule
+, circulation.stop_fines 
+FROM action.circulation 
+WHERE (
+     (
+           (circulation.checkin_time IS NULL)
+         AND (
+                 (circulation.stop_fines &lt;&gt; ALL 
+                       (ARRAY[&#39;LOST&#39;::text
+                             ,&#39;CLAIMSRETURNED&#39;::text]
+                       )
+                 )
+                OR (circulation.stop_fines IS NULL)
+           )
+     )
+   AND (circulation.due_date &lt; now
+           ()
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.overdue-reports">overdue_reports</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.overdue_reports Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>runner_barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>run_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>scheduled_wait_time</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT s.id
+, c.barcode AS runner_barcode
+, r.name
+, s.run_time
+, (s.run_time - now
+     ()
+) AS scheduled_wait_time 
+FROM (
+     (
+           (reporter.schedule s 
+              JOIN reporter.report r 
+                ON (
+                       (r.id = s.report)
+                 )
+           )
+        JOIN actor.usr u 
+          ON (
+                 (s.runner = u.id)
+           )
+     )
+  JOIN actor.card c 
+    ON (
+           (c.id = u.card)
+     )
+)
+WHERE (
+     (s.start_time IS NULL)
+   AND (s.run_time &lt; now
+           ()
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.pending-reports">pending_reports</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.pending_reports Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>runner_barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>run_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>scheduled_wait_time</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT s.id
+, c.barcode AS runner_barcode
+, r.name
+, s.run_time
+, (s.run_time - now
+     ()
+) AS scheduled_wait_time 
+FROM (
+     (
+           (reporter.schedule s 
+              JOIN reporter.report r 
+                ON (
+                       (r.id = s.report)
+                 )
+           )
+        JOIN actor.usr u 
+          ON (
+                 (s.runner = u.id)
+           )
+     )
+  JOIN actor.card c 
+    ON (
+           (c.id = u.card)
+     )
+)
+WHERE (s.start_time IS NULL);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.report">report</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.report Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.template">reporter.template.id</a>
+                  
+                
+                </td>
+            	<td>template</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>data</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.report-folder">reporter.report_folder.id</a>
+                  
+                
+                </td>
+            	<td>folder</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>recur</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recurance</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#reporter.table.schedule">reporter.schedule</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       rpt_rpt_fldr_idx folder
+    
+       rpt_rpt_owner_idx owner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.report-folder">report_folder</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.report_folder Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.report-folder">reporter.report_folder.id</a>
+                  
+                
+                </td>
+            	<td>parent</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>shared</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>share_with</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#reporter.table.report">reporter.report</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.report-folder">reporter.report_folder</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       rpt_rpt_fldr_owner_idx owner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.schedule">schedule</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.schedule Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.report">reporter.report.id</a>
+                  
+                
+                </td>
+            	<td>report</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#reporter.table.output-folder">reporter.output_folder.id</a>
+                  
+                
+                </td>
+            	<td>folder</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>runner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>run_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>start_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>complete_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>email</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>excel_format</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>html_format</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>csv_format</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>chart_pie</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>chart_bar</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>chart_line</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>error_code</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>error_text</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       rpt_sched_folder_idx folder
+    
+       rpt_sched_runner_idx runner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.simple-record">simple_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.simple_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>metarecord</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>uniform_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>publisher</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pubdate</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>series_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>series_statement</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>summary</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>isbn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>issn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>topic_subject</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>geographic_subject</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>genre</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name_subject</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>corporate_subject</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>external_uri</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT r.id
+, s.metarecord
+, r.fingerprint
+, r.quality
+, r.tcn_source
+, r.tcn_value
+, title.value AS title
+, uniform_title.value AS uniform_title
+, author.value AS author
+, publisher.value AS publisher
+,&quot;substring&quot;
+(pubdate.value
+     ,&#39;\\d+&#39;::text
+) AS pubdate
+, series_title.value AS series_title
+, series_statement.value AS series_statement
+, summary.value AS summary
+, array_accum
+(&quot;substring&quot;
+     (isbn.value
+           ,&#39;^\\S+&#39;::text
+     )
+) AS isbn
+, array_accum
+(&quot;substring&quot;
+     (issn.value
+           ,&#39;^\\S+&#39;::text
+     )
+) AS issn
+, ARRAY
+(
+SELECT DISTINCT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;650&#39;::bpchar)
+               AND (full_rec.subfield = &#39;a&#39;::text)
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY full_rec.value
+) AS topic_subject
+, ARRAY
+(
+SELECT DISTINCT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;651&#39;::bpchar)
+               AND (full_rec.subfield = &#39;a&#39;::text)
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY full_rec.value
+) AS geographic_subject
+, ARRAY
+(
+SELECT DISTINCT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;655&#39;::bpchar)
+               AND (full_rec.subfield = &#39;a&#39;::text)
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY full_rec.value
+) AS genre
+, ARRAY
+(
+SELECT DISTINCT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;600&#39;::bpchar)
+               AND (full_rec.subfield = &#39;a&#39;::text)
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY full_rec.value
+) AS name_subject
+, ARRAY
+(
+SELECT DISTINCT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;610&#39;::bpchar)
+               AND (full_rec.subfield = &#39;a&#39;::text)
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY full_rec.value
+) AS corporate_subject
+, ARRAY
+(
+SELECT full_rec.value 
+  FROM metabib.full_rec 
+ WHERE (
+           (
+                 (full_rec.tag = &#39;856&#39;::bpchar)
+               AND (full_rec.subfield = ANY 
+                       (ARRAY[&#39;3&#39;::text
+                             ,&#39;y&#39;::text
+                             ,&#39;u&#39;::text]
+                       )
+                 )
+           )
+         AND (full_rec.record = r.id)
+     )
+ORDER BY CASE WHEN 
+     (full_rec.subfield = ANY 
+           (ARRAY[&#39;3&#39;::text
+                 ,&#39;y&#39;::text]
+           )
+     ) THEN 0 ELSE 1 END
+) AS external_uri 
+FROM (
+     (
+           (
+                 (
+                       (
+                             (
+                                   (
+                                         (
+                                               (
+                                                     (
+                                                           (biblio.record_entry r 
+                                                              JOIN metabib.metarecord_source_map s 
+                                                                ON (
+                                                                       (s.source = r.id)
+                                                                 )
+                                                           )
+                                                   LEFT JOIN metabib.full_rec uniform_title 
+                                                          ON (
+                                                                 (
+                                                                       (
+                                                                             (r.id = uniform_title.record)
+                                                                           AND (uniform_title.tag = &#39;240&#39;::bpchar)
+                                                                       )
+                                                                     AND (uniform_title.subfield = &#39;a&#39;::text)
+                                                                 )
+                                                           )
+                                                     )
+                                             LEFT JOIN metabib.full_rec title 
+                                                    ON (
+                                                           (
+                                                                 (
+                                                                       (r.id = title.record)
+                                                                     AND (title.tag = &#39;245&#39;::bpchar)
+                                                                 )
+                                                               AND (title.subfield = &#39;a&#39;::text)
+                                                           )
+                                                     )
+                                               )
+                                       LEFT JOIN metabib.full_rec author 
+                                              ON (
+                                                     (
+                                                           (
+                                                                 (r.id = author.record)
+                                                               AND (author.tag = &#39;100&#39;::bpchar)
+                                                           )
+                                                         AND (author.subfield = &#39;a&#39;::text)
+                                                     )
+                                               )
+                                         )
+                                 LEFT JOIN metabib.full_rec publisher 
+                                        ON (
+                                               (
+                                                     (
+                                                           (r.id = publisher.record)
+                                                         AND (publisher.tag = &#39;260&#39;::bpchar)
+                                                     )
+                                                   AND (publisher.subfield = &#39;b&#39;::text)
+                                               )
+                                         )
+                                   )
+                           LEFT JOIN metabib.full_rec pubdate 
+                                  ON (
+                                         (
+                                               (
+                                                     (r.id = pubdate.record)
+                                                   AND (pubdate.tag = &#39;260&#39;::bpchar)
+                                               )
+                                             AND (pubdate.subfield = &#39;c&#39;::text)
+                                         )
+                                   )
+                             )
+                     LEFT JOIN metabib.full_rec isbn 
+                            ON (
+                                   (
+                                         (
+                                               (r.id = isbn.record)
+                                             AND (isbn.tag = ANY 
+                                                     (ARRAY[&#39;024&#39;::bpchar
+                                                           ,&#39;020&#39;::bpchar]
+                                                     )
+                                               )
+                                         )
+                                       AND (isbn.subfield = ANY 
+                                               (ARRAY[&#39;a&#39;::text
+                                                     ,&#39;z&#39;::text]
+                                               )
+                                         )
+                                   )
+                             )
+                       )
+               LEFT JOIN metabib.full_rec issn 
+                      ON (
+                             (
+                                   (
+                                         (r.id = issn.record)
+                                       AND (issn.tag = &#39;022&#39;::bpchar)
+                                   )
+                                 AND (issn.subfield = &#39;a&#39;::text)
+                             )
+                       )
+                 )
+         LEFT JOIN metabib.full_rec series_title 
+                ON (
+                       (
+                             (
+                                   (r.id = series_title.record)
+                                 AND (series_title.tag = ANY 
+                                         (ARRAY[&#39;830&#39;::bpchar
+                                               ,&#39;440&#39;::bpchar]
+                                         )
+                                   )
+                             )
+                           AND (series_title.subfield = &#39;a&#39;::text)
+                       )
+                 )
+           )
+   LEFT JOIN metabib.full_rec series_statement 
+          ON (
+                 (
+                       (
+                             (r.id = series_statement.record)
+                           AND (series_statement.tag = &#39;490&#39;::bpchar)
+                       )
+                     AND (series_statement.subfield = &#39;a&#39;::text)
+                 )
+           )
+     )
+LEFT JOIN metabib.full_rec summary 
+    ON (
+           (
+                 (
+                       (r.id = summary.record)
+                     AND (summary.tag = &#39;520&#39;::bpchar)
+                 )
+               AND (summary.subfield = &#39;a&#39;::text)
+           )
+     )
+)
+GROUP BY r.id
+, s.metarecord
+, r.fingerprint
+, r.quality
+, r.tcn_source
+, r.tcn_value
+, title.value
+, uniform_title.value
+, author.value
+, publisher.value
+,&quot;substring&quot;
+(pubdate.value
+     ,&#39;\\d+&#39;::text
+)
+, series_title.value
+, series_statement.value
+, summary.value;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.super-simple-record">super_simple_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.super_simple_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fingerprint</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>quality</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tcn_source</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>tcn_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>publisher</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pubdate</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>isbn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>issn</td>
+            	<td>text[]</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT materialized_simple_record.id
+, materialized_simple_record.fingerprint
+, materialized_simple_record.quality
+, materialized_simple_record.tcn_source
+, materialized_simple_record.tcn_value
+, materialized_simple_record.title
+, materialized_simple_record.author
+, materialized_simple_record.publisher
+, materialized_simple_record.pubdate
+, materialized_simple_record.isbn
+, materialized_simple_record.issn 
+FROM reporter.materialized_simple_record;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.template">template</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.template Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>data</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#reporter.table.template-folder">reporter.template_folder.id</a>
+                  
+                
+                </td>
+            	<td>folder</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#reporter.table.report">reporter.report</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       rpt_tmpl_fldr_idx folder
+    
+       rpt_tmpl_owner_idx owner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.table.template-folder">template_folder</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.template_folder Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#reporter.table.template-folder">reporter.template_folder.id</a>
+                  
+                
+                </td>
+            	<td>parent</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>shared</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>share_with</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#reporter.table.template">reporter.template</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#reporter.table.template-folder">reporter.template_folder</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+       rpt_tmpl_fldr_owner_idx owner
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.xact-billing-totals">xact_billing_totals</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.xact_billing_totals Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>unvoided</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT b.xact
+, sum
+(CASE WHEN b.voided THEN 
+     (0)::numeric ELSE b.amount END
+) AS unvoided
+, sum
+(CASE WHEN b.voided THEN b.amount ELSE 
+     (0)::numeric END
+) AS voided
+, sum
+(b.amount) AS total 
+FROM money.billing b 
+GROUP BY b.xact;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.view.xact-paid-totals">xact_paid_totals</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>reporter.xact_paid_totals Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>unvoided</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>voided</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>total</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT b.xact
+, sum
+(CASE WHEN b.voided THEN 
+     (0)::numeric ELSE b.amount END
+) AS unvoided
+, sum
+(CASE WHEN b.voided THEN b.amount ELSE 
+     (0)::numeric END
+) AS voided
+, sum
+(b.amount) AS total 
+FROM money.payment b 
+GROUP BY b.xact;</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#reporter.schema">Schema reporter</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.disable-materialized-simple-record-trigger">disable_materialized_simple_record_trigger()</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    DROP TRIGGER zzz_update_materialized_simple_record_tgr ON metabib.real_full_rec;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.enable-materialized-simple-record-trigger">enable_materialized_simple_record_trigger()</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+
+    TRUNCATE TABLE reporter.materialized_simple_record;
+
+    INSERT INTO reporter.materialized_simple_record
+        (id,fingerprint,quality,tcn_source,tcn_value,title,author,publisher,pubdate,isbn,issn)
+        SELECT DISTINCT ON (id) * FROM reporter.old_super_simple_record;
+
+    CREATE TRIGGER zzz_update_materialized_simple_record_tgr
+        AFTER INSERT OR UPDATE OR DELETE ON metabib.real_full_rec
+        FOR EACH ROW EXECUTE PROCEDURE reporter.simple_rec_sync();
+
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.refresh-materialized-simple-record">refresh_materialized_simple_record()</a>
+		</h2>
+<h3>Returns: void</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT reporter.disable_materialized_simple_record_trigger();
+    SELECT reporter.enable_materialized_simple_record_trigger();
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.simple-rec-bib-sync">simple_rec_bib_sync()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+    IF NEW.deleted THEN
+        DELETE FROM reporter.materialized_simple_record WHERE id = NEW.id;
+        RETURN NEW;
+    ELSE
+        RETURN NEW;
+    END IF;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.simple-rec-delete-r-id-bigint">simple_rec_delete(r_id bigint)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT reporter.simple_rec_update($1, TRUE);
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.simple-rec-sync">simple_rec_sync()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    r_id        BIGINT;
+    deleted     BOOL;
+BEGIN
+    IF TG_OP IN (&#39;DELETE&#39;) THEN
+        r_id := OLD.record;
+        deleted := TRUE;
+    ELSE
+        r_id := NEW.record;
+        deleted := FALSE;
+    END IF;
+
+    PERFORM reporter.simple_rec_update(r_id, deleted);
+
+    IF deleted THEN
+        RETURN OLD;
+    ELSE
+        RETURN NEW;
+    END IF;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.simple-rec-update-deleted-bigint-r-id-boolean">simple_rec_update(deleted bigint, r_id boolean)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+
+    DELETE FROM reporter.materialized_simple_record WHERE id = r_id;
+
+    IF NOT deleted THEN
+        INSERT INTO reporter.materialized_simple_record SELECT DISTINCT ON (id) * FROM reporter.old_super_simple_record WHERE id = r_id;
+    END IF;
+
+    RETURN TRUE;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#reporter.schema">reporter</a>.<a name="reporter.function.simple-rec-update-r-id-bigint">simple_rec_update(r_id bigint)</a>
+		</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT reporter.simple_rec_update($1, FALSE);
+</pre>
+	
+
+<!-- searchsearch -->
+
+		
+		<hr>
+		<h1>Schema search</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#search.schema">search</a>.<a name="search.table.relevance-adjustment">relevance_adjustment</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>search.relevance_adjustment Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.metabib-field">config.metabib_field.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>bump_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>multiplier</td>
+            	<td>numeric</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1.0
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>search.relevance_adjustment Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>relevance_adjustment_bump_type_check</td>
+                <td>CHECK ((bump_type = ANY (ARRAY[&#39;word_order&#39;::text, &#39;first_word&#39;::text, &#39;full_match&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#search.schema">Schema search</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#search.schema">search</a>.<a name="search.function.explode-array-anyarray">explode_array(anyarray)</a>
+		</h2>
+<h3>Returns: SET OF anyelement</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT ($1)[s] FROM generate_series(1, array_upper($1, 1)) AS s;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#search.schema">search</a>.<a name="search.function.parse-search-args-text">parse_search_args(text)</a>
+		</h2>
+<h3>Returns: SET OF search_args</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+    use JSON::XS;
+    my $json = shift;
+
+    my $args = decode_json( $json );
+
+    my $id = 1;
+
+    for my $k ( keys %$args ) {
+        (my $alias = $k) =~ s/\|/_/gso;
+        my ($class, $field) = split /\|/, $k;
+        my $part = $args-&gt;{$k};
+        for my $p ( keys %$part ) {
+            my $data = $part-&gt;{$p};
+            $data = [$data] if (!ref($data));
+            for my $datum ( @$data ) {
+                return_next(
+                    {   field_class =&gt; $class,
+                        field_name  =&gt; $field,
+                        term        =&gt; $datum,
+                        table_alias =&gt; $alias,
+                        term_type   =&gt; $p,
+                        id          =&gt; $id,
+                    }
+                );
+                $id++;
+            }
+        }
+    }
+
+    return undef;
+
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#search.schema">search</a>.<a name="search.function.pick-table-text">pick_table(text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: SQL</h3>
+        
+        <pre>
+    SELECT  CASE
+                WHEN $1 = &#39;author&#39;  THEN &#39;metabib.author_field_entry&#39;
+                WHEN $1 = &#39;title&#39;   THEN &#39;metabib.title_field_entry&#39;
+                WHEN $1 = &#39;subject&#39; THEN &#39;metabib.subject_field_entry&#39;
+                WHEN $1 = &#39;keyword&#39; THEN &#39;metabib.keyword_field_entry&#39;
+                WHEN $1 = &#39;series&#39;  THEN &#39;metabib.series_field_entry&#39;
+            END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#search.schema">search</a>.<a name="search.function.staged-fts-param-skip-chk-integer-param-chk-limit-integer-param-rel-limit-text-staff-integerARRAY-metarecord-integerARRAY-param-sort-desc-textARRAY-param-sort-textARRAY-param-pref-lang-multiplier-textARRAY-param-pref-lang-textARRAY-param-between-textARRAY-param-during-textARRAY-param-after-textARRAY-param-before-text-param-bib-level-text-param-vformats-text-param-forms-textARRAY-param-types-text-param-lit-form-real-param-language-text-param-audience-boolean-param-locations-boolean-param-statuses-boolean-param-searches-integer-param-depth-integer-param-search-ou-integer">staged_fts(param_skip_chk integer, param_chk_limit integer, param_rel_limit text, staff integer[], metarecord integer[], param_sort_desc text[], param_sort text[], param_pref_lang_multiplier text[], param_pref_lang text[], param_between text[], param_during text[], param_after text[], param_before text, param_bib_level text, param_vformats text, param_forms text[], param_types text, param_lit_form real, param_language text, param_audience boolean, param_locations boolean, param_statuses boolean, param_searches integer, param_depth integer, param_search_ou integer)</a>
+		</h2>
+<h3>Returns: SET OF search_result</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+
+    current_res         search.search_result%ROWTYPE;
+    query_part          search.search_args%ROWTYPE;
+    phrase_query_part   search.search_args%ROWTYPE;
+    rank_adjust_id      INT;
+    core_rel_limit      INT;
+    core_chk_limit      INT;
+    core_skip_chk       INT;
+    rank_adjust         search.relevance_adjustment%ROWTYPE;
+    query_table         TEXT;
+    tmp_text            TEXT;
+    tmp_int             INT;
+    current_rank        TEXT;
+    ranks               TEXT[] := &#39;{}&#39;;
+    query_table_alias   TEXT;
+    from_alias_array    TEXT[] := &#39;{}&#39;;
+    used_ranks          TEXT[] := &#39;{}&#39;;
+    mb_field            INT;
+    mb_field_list       INT[];
+    search_org_list     INT[];
+    select_clause       TEXT := &#39;SELECT&#39;;
+    from_clause         TEXT := &#39; FROM  metabib.metarecord_source_map m JOIN metabib.rec_descriptor mrd ON (m.source = mrd.record) &#39;;
+    where_clause        TEXT := &#39; WHERE 1=1 &#39;;
+    mrd_used            BOOL := FALSE;
+    sort_desc           BOOL := FALSE;
+
+    core_result         RECORD;
+    core_cursor         REFCURSOR;
+    core_rel_query      TEXT;
+    vis_limit_query     TEXT;
+    inner_where_clause  TEXT;
+
+    total_count         INT := 0;
+    check_count         INT := 0;
+    deleted_count       INT := 0;
+    visible_count       INT := 0;
+    excluded_count      INT := 0;
+
+BEGIN
+
+    core_rel_limit := COALESCE( param_rel_limit, 25000 );
+    core_chk_limit := COALESCE( param_chk_limit, 1000 );
+    core_skip_chk := COALESCE( param_skip_chk, 1 );
+
+    IF metarecord THEN
+        select_clause := select_clause || &#39; m.metarecord as id, array_accum(distinct m.source) as records,&#39;;
+    ELSE
+        select_clause := select_clause || &#39; m.source as id, array_accum(distinct m.source) as records,&#39;;
+    END IF;
+
+    -- first we need to construct the base query
+    FOR query_part IN SELECT * FROM search.parse_search_args(param_searches) WHERE term_type = &#39;fts_query&#39; LOOP
+
+        inner_where_clause := &#39;index_vector @@ &#39; || query_part.term;
+
+        IF query_part.field_name IS NOT NULL THEN
+
+           SELECT  id INTO mb_field
+             FROM  config.metabib_field
+             WHERE field_class = query_part.field_class
+                   AND name = query_part.field_name;
+
+            IF FOUND THEN
+                inner_where_clause := inner_where_clause ||
+                    &#39; AND &#39; || &#39;field = &#39; || mb_field;
+            END IF;
+
+        END IF;
+
+        -- moving on to the rank ...
+        SELECT  * INTO query_part
+          FROM  search.parse_search_args(param_searches)
+          WHERE term_type = &#39;fts_rank&#39;
+                AND table_alias = query_part.table_alias;
+
+        current_rank := query_part.term || &#39; * &#39; || query_part.table_alias || &#39;_weight.weight&#39;;
+
+        IF query_part.field_name IS NOT NULL THEN
+
+           SELECT  array_accum(distinct id) INTO mb_field_list
+             FROM  config.metabib_field
+             WHERE field_class = query_part.field_class
+                   AND name = query_part.field_name;
+
+        ELSE
+
+           SELECT  array_accum(distinct id) INTO mb_field_list
+             FROM  config.metabib_field
+             WHERE field_class = query_part.field_class;
+
+        END IF;
+
+        FOR rank_adjust IN SELECT * FROM search.relevance_adjustment WHERE active AND field IN ( SELECT * FROM search.explode_array( mb_field_list ) ) LOOP
+
+            IF NOT rank_adjust.bump_type = ANY (used_ranks) THEN
+
+                IF rank_adjust.bump_type = &#39;first_word&#39; THEN
+                    SELECT  term INTO tmp_text
+                      FROM  search.parse_search_args(param_searches)
+                      WHERE table_alias = query_part.table_alias AND term_type = &#39;word&#39;
+                      ORDER BY id
+                      LIMIT 1;
+
+                    tmp_text := query_part.table_alias || &#39;.value ILIKE &#39; || quote_literal( tmp_text || &#39;%&#39; );
+
+                ELSIF rank_adjust.bump_type = &#39;word_order&#39; THEN
+                    SELECT  array_to_string( array_accum( term ), &#39;%&#39; ) INTO tmp_text
+                      FROM  search.parse_search_args(param_searches)
+                      WHERE table_alias = query_part.table_alias AND term_type = &#39;word&#39;;
+
+                    tmp_text := query_part.table_alias || &#39;.value ILIKE &#39; || quote_literal( &#39;%&#39; || tmp_text || &#39;%&#39; );
+
+                ELSIF rank_adjust.bump_type = &#39;full_match&#39; THEN
+                    SELECT  array_to_string( array_accum( term ), E&#39;\\s+&#39; ) INTO tmp_text
+                      FROM  search.parse_search_args(param_searches)
+                      WHERE table_alias = query_part.table_alias AND term_type = &#39;word&#39;;
+
+                    tmp_text := query_part.table_alias || &#39;.value  ~ &#39; || quote_literal( &#39;^&#39; || tmp_text || E&#39;\\W*$&#39; );
+
+                END IF;
+
+
+                IF tmp_text IS NOT NULL THEN
+                    current_rank := current_rank || &#39; * ( CASE WHEN &#39; || tmp_text ||
+                        &#39; THEN &#39; || rank_adjust.multiplier || &#39;::REAL ELSE 1.0 END )&#39;;
+                END IF;
+
+                used_ranks := array_append( used_ranks, rank_adjust.bump_type );
+
+            END IF;
+
+        END LOOP;
+
+        ranks := array_append( ranks, current_rank );
+        used_ranks := &#39;{}&#39;;
+
+        FOR phrase_query_part IN
+            SELECT  * 
+              FROM  search.parse_search_args(param_searches)
+              WHERE term_type = &#39;phrase&#39;
+                    AND table_alias = query_part.table_alias LOOP
+
+            tmp_text := replace( phrase_query_part.term, &#39;*&#39;, E&#39;\\*&#39; );
+            tmp_text := replace( tmp_text, &#39;?&#39;, E&#39;\\?&#39; );
+            tmp_text := replace( tmp_text, &#39;+&#39;, E&#39;\\+&#39; );
+            tmp_text := replace( tmp_text, &#39;|&#39;, E&#39;\\|&#39; );
+            tmp_text := replace( tmp_text, &#39;(&#39;, E&#39;\\(&#39; );
+            tmp_text := replace( tmp_text, &#39;)&#39;, E&#39;\\)&#39; );
+            tmp_text := replace( tmp_text, &#39;[&#39;, E&#39;\\[&#39; );
+            tmp_text := replace( tmp_text, &#39;]&#39;, E&#39;\\]&#39; );
+
+            inner_where_clause := inner_where_clause || &#39; AND &#39; || &#39;value  ~* &#39; || quote_literal( E&#39;(^|\\W+)&#39; || regexp_replace(tmp_text, E&#39;\\s+&#39;,E&#39;\\\\s+&#39;,&#39;g&#39;) || E&#39;(\\W+|\$)&#39; );
+
+        END LOOP;
+
+        query_table := search.pick_table(query_part.field_class);
+
+        from_clause := from_clause ||
+            &#39; JOIN ( SELECT * FROM &#39; || query_table || &#39; WHERE &#39; || inner_where_clause ||
+                    CASE WHEN core_rel_limit &gt; 0 THEN &#39; LIMIT &#39; || core_rel_limit::TEXT ELSE &#39;&#39; END || &#39; ) AS &#39; || query_part.table_alias ||
+                &#39; ON ( m.source = &#39; || query_part.table_alias || &#39;.source )&#39; ||
+            &#39; JOIN config.metabib_field AS &#39; || query_part.table_alias || &#39;_weight&#39; ||
+                &#39; ON ( &#39; || query_part.table_alias || &#39;.field = &#39; || query_part.table_alias || &#39;_weight.id  AND  &#39; || query_part.table_alias || &#39;_weight.search_field)&#39;;
+
+        from_alias_array := array_append(from_alias_array, query_part.table_alias);
+
+    END LOOP;
+
+    IF param_pref_lang IS NOT NULL AND param_pref_lang_multiplier IS NOT NULL THEN
+        current_rank := &#39; CASE WHEN mrd.item_lang = &#39; || quote_literal( param_pref_lang ) ||
+            &#39; THEN &#39; || param_pref_lang_multiplier || &#39;::REAL ELSE 1.0 END &#39;;
+
+        -- ranks := array_append( ranks, current_rank );
+    END IF;
+
+    current_rank := &#39; AVG( ( (&#39; || array_to_string( ranks, &#39;) + (&#39; ) || &#39;) ) * &#39; || current_rank || &#39; ) &#39;;
+    select_clause := select_clause || current_rank || &#39; AS rel,&#39;;
+
+    sort_desc = param_sort_desc;
+
+    IF param_sort = &#39;pubdate&#39; THEN
+
+        tmp_text := &#39;999999&#39;;
+        IF param_sort_desc THEN tmp_text := &#39;0&#39;; END IF;
+
+        current_rank := $$ COALESCE( FIRST(NULLIF(REGEXP_REPLACE(mrd.date1, E&#39;\\D+&#39;, &#39;9&#39;, &#39;g&#39;),&#39;&#39;)), $$ || quote_literal(tmp_text) || $$ )::INT $$;
+
+    ELSIF param_sort = &#39;title&#39; THEN
+
+        tmp_text := &#39;zzzzzz&#39;;
+        IF param_sort_desc THEN tmp_text := &#39;    &#39;; END IF;
+
+        current_rank := $$
+            ( COALESCE( FIRST ((
+                SELECT  LTRIM(SUBSTR( frt.value, COALESCE(SUBSTRING(frt.ind2 FROM E&#39;\\d+&#39;),&#39;0&#39;)::INT + 1 ))
+                  FROM  metabib.full_rec frt
+                  WHERE frt.record = m.source
+                    AND frt.tag = &#39;245&#39;
+                    AND frt.subfield = &#39;a&#39;
+                  LIMIT 1
+            )),$$ || quote_literal(tmp_text) || $$))
+        $$;
+
+    ELSIF param_sort = &#39;author&#39; THEN
+
+        tmp_text := &#39;zzzzzz&#39;;
+        IF param_sort_desc THEN tmp_text := &#39;    &#39;; END IF;
+
+        current_rank := $$
+            ( COALESCE( FIRST ((
+                SELECT  LTRIM(fra.value)
+                  FROM  metabib.full_rec fra
+                  WHERE fra.record = m.source
+                    AND fra.tag LIKE &#39;1%&#39;
+                    AND fra.subfield = &#39;a&#39;
+                  ORDER BY fra.tag::text::int
+                  LIMIT 1
+            )),$$ || quote_literal(tmp_text) || $$))
+        $$;
+
+    ELSIF param_sort = &#39;create_date&#39; THEN
+            current_rank := $$( FIRST (( SELECT create_date FROM biblio.record_entry rbr WHERE rbr.id = m.source)) )$$;
+    ELSIF param_sort = &#39;edit_date&#39; THEN
+            current_rank := $$( FIRST (( SELECT edit_date FROM biblio.record_entry rbr WHERE rbr.id = m.source)) )$$;
+    ELSE
+        sort_desc := NOT COALESCE(param_sort_desc, FALSE);
+    END IF;
+
+    select_clause := select_clause || current_rank || &#39; AS rank&#39;;
+
+    -- now add the other qualifiers
+    IF param_audience IS NOT NULL AND array_upper(param_audience, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.audience IN (&#39;$$ || array_to_string(param_audience, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_language IS NOT NULL AND array_upper(param_language, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.item_lang IN (&#39;$$ || array_to_string(param_language, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_lit_form IS NOT NULL AND array_upper(param_lit_form, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.lit_form IN (&#39;$$ || array_to_string(param_lit_form, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_types IS NOT NULL AND array_upper(param_types, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.item_type IN (&#39;$$ || array_to_string(param_types, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_forms IS NOT NULL AND array_upper(param_forms, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.item_form IN (&#39;$$ || array_to_string(param_forms, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_vformats IS NOT NULL AND array_upper(param_vformats, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.vr_format IN (&#39;$$ || array_to_string(param_vformats, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_bib_level IS NOT NULL AND array_upper(param_bib_level, 1) &gt; 0 THEN
+        where_clause = where_clause || $$ AND mrd.bib_level IN (&#39;$$ || array_to_string(param_bib_level, $$&#39;,&#39;$$) || $$&#39;) $$;
+    END IF;
+
+    IF param_before IS NOT NULL AND param_before &lt;&gt; &#39;&#39; THEN
+        where_clause = where_clause || $$ AND mrd.date1 &lt;= $$ || quote_literal(param_before) || &#39; &#39;;
+    END IF;
+
+    IF param_after IS NOT NULL AND param_after &lt;&gt; &#39;&#39; THEN
+        where_clause = where_clause || $$ AND mrd.date1 &gt;= $$ || quote_literal(param_after) || &#39; &#39;;
+    END IF;
+
+    IF param_during IS NOT NULL AND param_during &lt;&gt; &#39;&#39; THEN
+        where_clause = where_clause || $$ AND $$ || quote_literal(param_during) || $$ BETWEEN mrd.date1 AND mrd.date2 $$;
+    END IF;
+
+    IF param_between IS NOT NULL AND array_upper(param_between, 1) &gt; 1 THEN
+        where_clause = where_clause || $$ AND mrd.date1 BETWEEN &#39;$$ || array_to_string(param_between, $$&#39; AND &#39;$$) || $$&#39; $$;
+    END IF;
+
+    core_rel_query := select_clause || from_clause || where_clause ||
+                        &#39; GROUP BY 1 ORDER BY 4&#39; || CASE WHEN sort_desc THEN &#39; DESC&#39; ELSE &#39; ASC&#39; END || &#39;;&#39;;
+    --RAISE NOTICE &#39;Base Query:  %&#39;, core_rel_query;
+
+    IF param_search_ou &gt; 0 THEN
+        IF param_depth IS NOT NULL THEN
+            SELECT array_accum(distinct id) INTO search_org_list FROM actor.org_unit_descendants( param_search_ou, param_depth );
+        ELSE
+            SELECT array_accum(distinct id) INTO search_org_list FROM actor.org_unit_descendants( param_search_ou );
+        END IF;
+    ELSIF param_search_ou &lt; 0 THEN
+        SELECT array_accum(distinct org_unit) INTO search_org_list FROM actor.org_lasso_map WHERE lasso = -param_search_ou;
+    ELSIF param_search_ou = 0 THEN
+        -- reserved for user lassos (ou_buckets/type=&#39;lasso&#39;) with ID passed in depth ... hack? sure.
+    END IF;
+
+    OPEN core_cursor FOR EXECUTE core_rel_query;
+
+    LOOP
+
+        FETCH core_cursor INTO core_result;
+        EXIT WHEN NOT FOUND;
+
+
+        IF total_count % 1000 = 0 THEN
+            -- RAISE NOTICE &#39; % total, % checked so far ... &#39;, total_count, check_count;
+        END IF;
+
+        IF core_chk_limit &gt; 0 AND total_count - core_skip_chk + 1 &gt;= core_chk_limit THEN
+            total_count := total_count + 1;
+            CONTINUE;
+        END IF;
+
+        total_count := total_count + 1;
+
+        CONTINUE WHEN param_skip_chk IS NOT NULL and total_count &lt; param_skip_chk;
+
+        check_count := check_count + 1;
+
+        PERFORM 1 FROM biblio.record_entry b WHERE NOT b.deleted AND b.id IN ( SELECT * FROM search.explode_array( core_result.records ) );
+        IF NOT FOUND THEN
+            -- RAISE NOTICE &#39; % were all deleted ... &#39;, core_result.records;
+            deleted_count := deleted_count + 1;
+            CONTINUE;
+        END IF;
+
+        PERFORM 1
+          FROM  biblio.record_entry b
+                JOIN config.bib_source s ON (b.source = s.id)
+          WHERE s.transcendant
+                AND b.id IN ( SELECT * FROM search.explode_array( core_result.records ) );
+
+        IF FOUND THEN
+            -- RAISE NOTICE &#39; % were all transcendant ... &#39;, core_result.records;
+            visible_count := visible_count + 1;
+
+            current_res.id = core_result.id;
+            current_res.rel = core_result.rel;
+
+            tmp_int := 1;
+            IF metarecord THEN
+                SELECT COUNT(DISTINCT s.source) INTO tmp_int FROM metabib.metarecord_source_map s WHERE s.metarecord = core_result.id;
+            END IF;
+
+            IF tmp_int = 1 THEN
+                current_res.record = core_result.records[1];
+            ELSE
+                current_res.record = NULL;
+            END IF;
+
+            RETURN NEXT current_res;
+
+            CONTINUE;
+        END IF;
+
+        PERFORM 1
+          FROM  asset.call_number cn
+                JOIN asset.uri_call_number_map map ON (map.call_number = cn.id)
+                JOIN asset.uri uri ON (map.uri = uri.id)
+          WHERE NOT cn.deleted
+                AND cn.label = &#39;##URI##&#39;
+                AND uri.active
+                AND ( param_locations IS NULL OR array_upper(param_locations, 1) IS NULL )
+                AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+                AND cn.owning_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+          LIMIT 1;
+
+        IF FOUND THEN
+            -- RAISE NOTICE &#39; % have at least one URI ... &#39;, core_result.records;
+            visible_count := visible_count + 1;
+
+            current_res.id = core_result.id;
+            current_res.rel = core_result.rel;
+
+            tmp_int := 1;
+            IF metarecord THEN
+                SELECT COUNT(DISTINCT s.source) INTO tmp_int FROM metabib.metarecord_source_map s WHERE s.metarecord = core_result.id;
+            END IF;
+
+            IF tmp_int = 1 THEN
+                current_res.record = core_result.records[1];
+            ELSE
+                current_res.record = NULL;
+            END IF;
+
+            RETURN NEXT current_res;
+
+            CONTINUE;
+        END IF;
+
+        IF param_statuses IS NOT NULL AND array_upper(param_statuses, 1) &gt; 0 THEN
+
+            PERFORM 1
+              FROM  asset.call_number cn
+                    JOIN asset.copy cp ON (cp.call_number = cn.id)
+              WHERE NOT cn.deleted
+                    AND NOT cp.deleted
+                    AND cp.status IN ( SELECT * FROM search.explode_array( param_statuses ) )
+                    AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+                    AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+              LIMIT 1;
+
+            IF NOT FOUND THEN
+                -- RAISE NOTICE &#39; % were all status-excluded ... &#39;, core_result.records;
+                excluded_count := excluded_count + 1;
+                CONTINUE;
+            END IF;
+
+        END IF;
+
+        IF param_locations IS NOT NULL AND array_upper(param_locations, 1) &gt; 0 THEN
+
+            PERFORM 1
+              FROM  asset.call_number cn
+                    JOIN asset.copy cp ON (cp.call_number = cn.id)
+              WHERE NOT cn.deleted
+                    AND NOT cp.deleted
+                    AND cp.location IN ( SELECT * FROM search.explode_array( param_locations ) )
+                    AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+                    AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+              LIMIT 1;
+
+            IF NOT FOUND THEN
+                -- RAISE NOTICE &#39; % were all copy_location-excluded ... &#39;, core_result.records;
+                excluded_count := excluded_count + 1;
+                CONTINUE;
+            END IF;
+
+        END IF;
+
+        IF staff IS NULL OR NOT staff THEN
+
+            PERFORM 1
+              FROM  asset.call_number cn
+                    JOIN asset.copy cp ON (cp.call_number = cn.id)
+                    JOIN actor.org_unit a ON (cp.circ_lib = a.id)
+                    JOIN asset.copy_location cl ON (cp.location = cl.id)
+                    JOIN config.copy_status cs ON (cp.status = cs.id)
+              WHERE NOT cn.deleted
+                    AND NOT cp.deleted
+                    AND cs.opac_visible
+                    AND cl.opac_visible
+                    AND cp.opac_visible
+                    AND a.opac_visible
+                    AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+                    AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+              LIMIT 1;
+
+            IF NOT FOUND THEN
+                -- RAISE NOTICE &#39; % were all visibility-excluded ... &#39;, core_result.records;
+                excluded_count := excluded_count + 1;
+                CONTINUE;
+            END IF;
+
+        ELSE
+
+            PERFORM 1
+              FROM  asset.call_number cn
+                    JOIN asset.copy cp ON (cp.call_number = cn.id)
+                    JOIN actor.org_unit a ON (cp.circ_lib = a.id)
+                    JOIN asset.copy_location cl ON (cp.location = cl.id)
+              WHERE NOT cn.deleted
+                    AND NOT cp.deleted
+                    AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )
+                    AND cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+              LIMIT 1;
+
+            IF NOT FOUND THEN
+
+                PERFORM 1
+                  FROM  asset.call_number cn
+                  WHERE cn.record IN ( SELECT * FROM search.explode_array( core_result.records ) )
+                  LIMIT 1;
+
+                IF FOUND THEN
+                    -- RAISE NOTICE &#39; % were all visibility-excluded ... &#39;, core_result.records;
+                    excluded_count := excluded_count + 1;
+                    CONTINUE;
+                END IF;
+
+            END IF;
+
+        END IF;
+
+        visible_count := visible_count + 1;
+
+        current_res.id = core_result.id;
+        current_res.rel = core_result.rel;
+
+        tmp_int := 1;
+        IF metarecord THEN
+            SELECT COUNT(DISTINCT s.source) INTO tmp_int FROM metabib.metarecord_source_map s WHERE s.metarecord = core_result.id;
+        END IF;
+
+        IF tmp_int = 1 THEN
+            current_res.record = core_result.records[1];
+        ELSE
+            current_res.record = NULL;
+        END IF;
+
+        RETURN NEXT current_res;
+
+        IF visible_count % 1000 = 0 THEN
+            -- RAISE NOTICE &#39; % visible so far ... &#39;, visible_count;
+        END IF;
+
+    END LOOP;
+
+    current_res.id = NULL;
+    current_res.rel = NULL;
+    current_res.record = NULL;
+    current_res.total = total_count;
+    current_res.checked = check_count;
+    current_res.deleted = deleted_count;
+    current_res.visible = visible_count;
+    current_res.excluded = excluded_count;
+
+    CLOSE core_cursor;
+
+    RETURN NEXT current_res;
+
+END;
+</pre>
+	
+
+<!-- serialserial -->
+
+		
+		<hr>
+		<h1>Schema serial</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.bib-summary">bib_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.bib_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#serial.table.subscription">serial.subscription.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>subscription</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>generated_coverage</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>textual_holdings</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.binding-unit">binding_unit</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.binding_unit Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#serial.table.subscription">serial.subscription.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>subscription</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#serial.table.issuance">serial.issuance</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.index-summary">index_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.index_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#serial.table.subscription">serial.subscription.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>subscription</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>generated_coverage</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>textual_holdings</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.issuance">issuance</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.issuance Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#serial.table.subscription">serial.subscription.id</a>
+                  
+                
+                </td>
+            	<td>subscription</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy">asset.copy.id</a>
+                  
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.copy-location">asset.copy_location.id</a>
+                  
+                
+                </td>
+            	<td>location</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#serial.table.binding-unit">serial.binding_unit.id</a>
+                  
+                
+                </td>
+            	<td>binding_unit</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.record-entry">record_entry</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.record_entry Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT 1
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>source</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>active</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT true
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>last_xact_id</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+       serial_record_entry_creator_idx creator
+    
+       serial_record_entry_editor_idx editor
+    
+       serial_record_entry_owning_lib_idx owning_lib, deleted
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.subscription">subscription</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.subscription Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#asset.table.call-number">asset.call_number.id</a>
+                  
+                
+                </td>
+            	<td>callnumber</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#asset.table.uri">asset.uri.id</a>
+                  
+                
+                </td>
+            	<td>uri</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>start_date</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>end_date</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#serial.table.bib-summary">serial.bib_summary</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.binding-unit">serial.binding_unit</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.index-summary">serial.index_summary</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.issuance">serial.issuance</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#serial.table.sup-summary">serial.sup_summary</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#serial.schema">serial</a>.<a name="serial.table.sup-summary">sup_summary</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>serial.sup_summary Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#serial.table.subscription">serial.subscription.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>subscription</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>generated_coverage</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>textual_holdings</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#serial.schema">Schema serial</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- statsstats -->
+
+		
+		<hr>
+		<h1>Schema stats</h1>
+		
+
+		
+		
+        <hr>
+		<h2>View:
+			
+			<a href="#stats.schema">stats</a>.<a name="stats.view.fleshed-call-number">fleshed_call_number</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>stats.fleshed_call_number Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_lang</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>item_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT cn.id
+, cn.creator
+, cn.create_date
+, cn.editor
+, cn.edit_date
+, cn.record
+, cn.owning_lib
+, cn.label
+, cn.deleted
+, (cn.create_date)::date AS create_date_day
+, (cn.edit_date)::date AS edit_date_day
+, date_trunc
+(&#39;hour&#39;::text
+     , cn.create_date
+) AS create_date_hour
+, date_trunc
+(&#39;hour&#39;::text
+     , cn.edit_date
+) AS edit_date_hour
+, rd.item_lang
+, rd.item_type
+, rd.item_form 
+FROM (asset.call_number cn 
+  JOIN metabib.rec_descriptor rd 
+    ON (
+           (rd.record = cn.record)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#stats.schema">Schema stats</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#stats.schema">stats</a>.<a name="stats.view.fleshed-circulation">fleshed_circulation</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>stats.fleshed_circulation Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>usr</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>xact_start</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xact_finish</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>unrecovered</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>target_copy</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>checkin_staff</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>renewal_remaining</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>due_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>stop_fines_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>checkin_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>duration</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>fine_interval</td>
+            	<td>interval</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>phone_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>desk_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_renewal</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>duration_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>recuring_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>max_fine_rule</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>stop_fines</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>start_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>finish_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>start_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>finish_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>call_number_label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>item_lang</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>item_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT c.id
+, c.usr
+, c.xact_start
+, c.xact_finish
+, c.unrecovered
+, c.target_copy
+, c.circ_lib
+, c.circ_staff
+, c.checkin_staff
+, c.checkin_lib
+, c.renewal_remaining
+, c.due_date
+, c.stop_fines_time
+, c.checkin_time
+, c.create_time
+, c.duration
+, c.fine_interval
+, c.recuring_fine
+, c.max_fine
+, c.phone_renewal
+, c.desk_renewal
+, c.opac_renewal
+, c.duration_rule
+, c.recuring_fine_rule
+, c.max_fine_rule
+, c.stop_fines
+, (c.xact_start)::date AS start_date_day
+, (c.xact_finish)::date AS finish_date_day
+, date_trunc
+(&#39;hour&#39;::text
+     , c.xact_start
+) AS start_date_hour
+, date_trunc
+(&#39;hour&#39;::text
+     , c.xact_finish
+) AS finish_date_hour
+, cp.call_number_label
+, cp.owning_lib
+, cp.item_lang
+, cp.item_type
+, cp.item_form 
+FROM (action.circulation c 
+  JOIN stats.fleshed_copy cp 
+    ON (
+           (cp.id = c.target_copy)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#stats.schema">Schema stats</a>
+    </p>
+	
+        <hr>
+		<h2>View:
+			
+			<a href="#stats.schema">stats</a>.<a name="stats.view.fleshed-copy">fleshed_copy</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>stats.fleshed_copy Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>creator</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>call_number</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>editor</td>
+            	<td>bigint</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>status</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>loan_duration</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>fine_level</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>age_protect</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(6,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>dummy_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>dummy_author</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deleted</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date_day</td>
+            	<td>date</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>edit_date_hour</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>call_number_label</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_lang</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>item_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>item_form</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+	<pre>
+SELECT cp.id
+, cp.circ_lib
+, cp.creator
+, cp.call_number
+, cp.editor
+, cp.create_date
+, cp.edit_date
+, cp.copy_number
+, cp.status
+, cp.location
+, cp.loan_duration
+, cp.fine_level
+, cp.age_protect
+, cp.circulate
+, cp.deposit
+, cp.ref
+, cp.holdable
+, cp.deposit_amount
+, cp.price
+, cp.barcode
+, cp.circ_modifier
+, cp.circ_as_type
+, cp.dummy_title
+, cp.dummy_author
+, cp.alert_message
+, cp.opac_visible
+, cp.deleted
+, (cp.create_date)::date AS create_date_day
+, (cp.edit_date)::date AS edit_date_day
+, date_trunc
+(&#39;hour&#39;::text
+     , cp.create_date
+) AS create_date_hour
+, date_trunc
+(&#39;hour&#39;::text
+     , cp.edit_date
+) AS edit_date_hour
+, cn.label AS call_number_label
+, cn.owning_lib
+, rd.item_lang
+, rd.item_type
+, rd.item_form 
+FROM (
+     (asset.copy cp 
+        JOIN asset.call_number cn 
+          ON (
+                 (cp.call_number = cn.id)
+           )
+     )
+  JOIN metabib.rec_descriptor rd 
+    ON (
+           (rd.record = cn.record)
+     )
+);</pre>
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#stats.schema">Schema stats</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+
+<!-- vandelayvandelay -->
+
+		
+		<hr>
+		<h1>Schema vandelay</h1>
+		
+
+		
+		
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.authority-attr-definition">authority_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.authority_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-authority-record-attr">vandelay.queued_authority_record_attr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.authority-match">authority_match</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.authority_match Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-authority-record-attr">vandelay.queued_authority_record_attr.id</a>
+                  
+                
+                </td>
+            	<td>matched_attr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-authority-record">vandelay.queued_authority_record.id</a>
+                  
+                
+                </td>
+            	<td>queued_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#authority.table.record-entry">authority.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>eg_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.authority-queue">authority_queue</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.authority_queue Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;vandelay.queue_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>complete</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>queue_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;authority&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table vandelay.authority_queue Inherits
+        
+            
+           <a href="#vandelay.table.queue">queue</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.authority_queue Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>authority_queue_queue_type_check</td>
+                <td>CHECK ((queue_type = &#39;authority&#39;::text))</td>
+            </tr>
+			
+            <tr class="tr1">
+				<td>queue_queue_type_check</td>
+                <td>CHECK ((queue_type = ANY (ARRAY[&#39;bib&#39;::text, &#39;authority&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-authority-record">vandelay.queued_authority_record</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.bib-attr-definition">bib_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.bib_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>serial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>code</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>description</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>xpath</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>remove</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>ident</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-bib-record-attr">vandelay.queued_bib_record_attr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.bib-match">bib_match</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.bib_match Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>field_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-bib-record-attr">vandelay.queued_bib_record_attr.id</a>
+                  
+                
+                </td>
+            	<td>matched_attr</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record.id</a>
+                  
+                
+                </td>
+            	<td>queued_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>eg_record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.bib_match Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>bib_match_field_type_check</td>
+                <td>CHECK ((field_type = ANY (ARRAY[&#39;isbn&#39;::text, &#39;tcn_value&#39;::text, &#39;id&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.bib-queue">bib_queue</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.bib_queue Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;vandelay.queue_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>complete</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>queue_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;bib&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.import-item-attr-definition">vandelay.import_item_attr_definition.id</a>
+                  
+                
+                </td>
+            	<td>item_attr_def</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table vandelay.bib_queue Inherits
+        
+            
+           <a href="#vandelay.table.queue">queue</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.bib_queue Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>bib_queue_queue_type_check</td>
+                <td>CHECK ((queue_type = &#39;bib&#39;::text))</td>
+            </tr>
+			
+            <tr class="tr1">
+				<td>queue_queue_type_check</td>
+                <td>CHECK ((queue_type = ANY (ARRAY[&#39;bib&#39;::text, &#39;authority&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.import-bib-trash-fields">import_bib_trash_fields</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.import_bib_trash_fields Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.import-item">import_item</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.import_item Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.import-item-attr-definition">vandelay.import_item_attr_definition.id</a>
+                  
+                
+                </td>
+            	<td>definition</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>call_number</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>status</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>location</td>
+            	<td>integer</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>numeric(8,2)</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pub_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>priv_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.import-item-attr-definition">import_item_attr_definition</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.import_item_attr_definition Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.org-unit">actor.org_unit.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>tag</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>keep</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>owning_lib</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_lib</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>call_number</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>copy_number</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>status</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>location</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circulate</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>deposit</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>deposit_amount</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>ref</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>holdable</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>price</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>barcode</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>circ_modifier</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>circ_as_type</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>alert_message</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>opac_visible</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>pub_note_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>pub_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>priv_note_title</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>priv_note</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.bib-queue">vandelay.bib_queue</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.import-item">vandelay.import_item</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queue">queue</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queue Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#actor.table.usr">actor.usr.id</a>
+                  
+                
+                  
+                
+                </td>
+            	<td>owner</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>name</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>complete</td>
+            	<td>boolean</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT false
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>queue_type</td>
+            	<td>text</td>
+                <td><i>
+				
+					
+
+					
+                       UNIQUE#1
+                    
+				
+
+				NOT NULL
+				DEFAULT &#39;bib&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.queue Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>queue_queue_type_check</td>
+                <td>CHECK ((queue_type = ANY (ARRAY[&#39;bib&#39;::text, &#39;authority&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queued-authority-record">queued_authority_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queued_authority_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;vandelay.queued_record_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>import_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>purpose</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;import&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.authority-queue">vandelay.authority_queue.id</a>
+                  
+                
+                </td>
+            	<td>queue</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#authority.table.record-entry">authority.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>imported_as</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table vandelay.queued_authority_record Inherits
+        
+            
+           <a href="#vandelay.table.queued-record">queued_record</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.queued_authority_record Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>queued_record_purpose_check</td>
+                <td>CHECK ((purpose = ANY (ARRAY[&#39;import&#39;::text, &#39;overlay&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.authority-match">vandelay.authority_match</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-authority-record-attr">vandelay.queued_authority_record_attr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queued-authority-record-attr">queued_authority_record_attr</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queued_authority_record_attr Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-authority-record">vandelay.queued_authority_record.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.authority-attr-definition">vandelay.authority_attr_definition.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>attr_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.authority-match">vandelay.authority_match</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queued-bib-record">queued_bib_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queued_bib_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				DEFAULT nextval(&#39;vandelay.queued_record_id_seq&#39;::regclass)
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>import_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>purpose</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;import&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.bib-queue">vandelay.bib_queue.id</a>
+                  
+                
+                </td>
+            	<td>queue</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#config.table.bib-source">config.bib_source.id</a>
+                  
+                
+                </td>
+            	<td>bib_source</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#biblio.table.record-entry">biblio.record_entry.id</a>
+                  
+                
+                </td>
+            	<td>imported_as</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+        <p>Table vandelay.queued_bib_record Inherits
+        
+            
+           <a href="#vandelay.table.queued-record">queued_record</a>, 
+        
+        </p>
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.queued_bib_record Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>queued_record_purpose_check</td>
+                <td>CHECK ((purpose = ANY (ARRAY[&#39;import&#39;::text, &#39;overlay&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.bib-match">vandelay.bib_match</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.import-item">vandelay.import_item</a></li>
+			</ul>
+		
+			<ul>
+				<li><a href="#vandelay.table.queued-bib-record-attr">vandelay.queued_bib_record_attr</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queued-bib-record-attr">queued_bib_record_attr</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queued_bib_record_attr Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.queued-bib-record">vandelay.queued_bib_record.id</a>
+                  
+                
+                </td>
+            	<td>record</td>
+            	<td>bigint</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                  <a href="#vandelay.table.bib-attr-definition">vandelay.bib_attr_definition.id</a>
+                  
+                
+                </td>
+            	<td>field</td>
+            	<td>integer</td>
+                <td><i>
+				
+					
+
+					
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>attr_value</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+
+        <!-- Foreign Key Discovery -->
+		
+			<p>Tables referencing this one via Foreign Key Constraints:</p>
+		
+			<ul>
+				<li><a href="#vandelay.table.bib-match">vandelay.bib_match</a></li>
+			</ul>
+		
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+        <hr>
+		<h2>Table:
+			
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.table.queued-record">queued_record</a>
+		</h2>
+        
+
+
+        <table width="100%" cellspacing="0" cellpadding="3">
+                <caption>vandelay.queued_record Structure</caption>
+                <tr>
+                <th>F-Key</th>
+                <th>Name</th>
+                <th>Type</th>
+                <th>Description</th>
+                </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                  
+                
+                </td>
+            	<td>id</td>
+            	<td>bigserial</td>
+                <td><i>
+				
+					PRIMARY KEY
+					
+
+					
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>create_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT now()
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>import_time</td>
+            	<td>timestamp with time zone</td>
+                <td><i>
+				
+
+				
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr1">
+				<td>
+                
+                </td>
+            	<td>purpose</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				DEFAULT &#39;import&#39;::text
+				</i>
+				
+				</td>
+			 </tr>
+            
+            <tr class="tr0">
+				<td>
+                
+                </td>
+            	<td>marc</td>
+            	<td>text</td>
+                <td><i>
+				
+
+				NOT NULL
+				
+				</i>
+				
+				</td>
+			 </tr>
+            
+        </table>
+
+        <!-- Inherits -->
+		
+
+		
+		
+		
+
+        <!-- Constraint List -->
+		
+        <p>&nbsp;</p>
+		<table width="100%" cellspacing="0" cellpadding="3">
+            <caption>vandelay.queued_record Constraints</caption>
+            <tr>
+            	<th>Name</th>
+            	<th>Constraint</th>
+            </tr>
+			
+            <tr class="tr0">
+				<td>queued_record_purpose_check</td>
+                <td>CHECK ((purpose = ANY (ARRAY[&#39;import&#39;::text, &#39;overlay&#39;::text])))</td>
+            </tr>
+			
+		</table>
+		
+
+        <!-- Foreign Key Discovery -->
+		
+
+    <!-- Indexes -->
+    
+
+	<!-- View Definition -->
+	
+
+	<!-- List off permissions -->
+	
+
+	<p>
+		<a href="#index">Index</a> -
+		<a href="#vandelay.schema">Schema vandelay</a>
+    </p>
+	
+
+	<!-- We've gone through the table structure, now lets take a look at user functions -->
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.cleanup-authority-marc">cleanup_authority_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+    DELETE FROM vandelay.queued_authority_record_attr WHERE record = OLD.id;
+    IF TG_OP = &#39;UPDATE&#39; THEN
+        RETURN NEW;
+    END IF;
+    RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.cleanup-bib-marc">cleanup_bib_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+BEGIN
+    DELETE FROM vandelay.queued_bib_record_attr WHERE record = OLD.id;
+    DELETE FROM vandelay.import_item WHERE record = OLD.id;
+
+    IF TG_OP = &#39;UPDATE&#39; THEN
+        RETURN NEW;
+    END IF;
+    RETURN OLD;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.ingest-authority-marc">ingest_authority_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    value   TEXT;
+    atype   TEXT;
+    adef    RECORD;
+BEGIN
+    FOR adef IN SELECT * FROM vandelay.authority_attr_definition LOOP
+
+        SELECT extract_marc_field(&#39;vandelay.queued_authority_record&#39;, id, adef.xpath, adef.remove) INTO value FROM vandelay.queued_authority_record WHERE id = NEW.id;
+        IF (value IS NOT NULL AND value &lt;&gt; &#39;&#39;) THEN
+            INSERT INTO vandelay.queued_authority_record_attr (record, field, attr_value) VALUES (NEW.id, adef.id, value);
+        END IF;
+
+    END LOOP;
+
+    RETURN NULL;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.ingest-bib-items">ingest_bib_items()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    queue_rec   RECORD;
+    item_rule   RECORD;
+    item_data   vandelay.import_item%ROWTYPE;
+BEGIN
+
+    SELECT * INTO queue_rec FROM vandelay.bib_queue WHERE id = NEW.queue;
+
+    FOR item_rule IN SELECT r.* FROM actor.org_unit_ancestors( queue_rec.owner ) o JOIN vandelay.import_item_attr_definition r ON ( r.owner = o.id ) LOOP
+        FOR item_data IN SELECT * FROM vandelay.ingest_items( NEW.id::BIGINT, item_rule.id::BIGINT ) LOOP
+            INSERT INTO vandelay.import_item (
+		record,
+                definition,
+                owning_lib,
+                circ_lib,
+                call_number,
+                copy_number,
+                status,
+                location,
+                circulate,
+                deposit,
+                deposit_amount,
+                ref,
+                holdable,
+                price,
+                barcode,
+                circ_modifier,
+                circ_as_type,
+                alert_message,
+                pub_note,
+                priv_note,
+                opac_visible
+            ) VALUES (
+		NEW.id,
+                item_data.definition,
+                item_data.owning_lib,
+                item_data.circ_lib,
+                item_data.call_number,
+                item_data.copy_number,
+                item_data.status,
+                item_data.location,
+                item_data.circulate,
+                item_data.deposit,
+                item_data.deposit_amount,
+                item_data.ref,
+                item_data.holdable,
+                item_data.price,
+                item_data.barcode,
+                item_data.circ_modifier,
+                item_data.circ_as_type,
+                item_data.alert_message,
+                item_data.pub_note,
+                item_data.priv_note,
+                item_data.opac_visible
+            );
+        END LOOP;
+    END LOOP;
+
+    RETURN NULL;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.ingest-bib-marc">ingest_bib_marc()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    value   TEXT;
+    atype   TEXT;
+    adef    RECORD;
+BEGIN
+    FOR adef IN SELECT * FROM vandelay.bib_attr_definition LOOP
+
+        SELECT extract_marc_field(&#39;vandelay.queued_bib_record&#39;, id, adef.xpath, adef.remove) INTO value FROM vandelay.queued_bib_record WHERE id = NEW.id;
+        IF (value IS NOT NULL AND value &lt;&gt; &#39;&#39;) THEN
+            INSERT INTO vandelay.queued_bib_record_attr (record, field, attr_value) VALUES (NEW.id, adef.id, value);
+        END IF;
+
+    END LOOP;
+
+    RETURN NULL;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.ingest-items-attr-def-id-bigint-import-id-bigint">ingest_items(attr_def_id bigint, import_id bigint)</a>
+		</h2>
+<h3>Returns: SET OF import_item</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+
+    owning_lib      TEXT;
+    circ_lib        TEXT;
+    call_number     TEXT;
+    copy_number     TEXT;
+    status          TEXT;
+    location        TEXT;
+    circulate       TEXT;
+    deposit         TEXT;
+    deposit_amount  TEXT;
+    ref             TEXT;
+    holdable        TEXT;
+    price           TEXT;
+    barcode         TEXT;
+    circ_modifier   TEXT;
+    circ_as_type    TEXT;
+    alert_message   TEXT;
+    opac_visible    TEXT;
+    pub_note        TEXT;
+    priv_note       TEXT;
+
+    attr_def        RECORD;
+    tmp_attr_set    RECORD;
+    attr_set        vandelay.import_item%ROWTYPE;
+
+    xpath           TEXT;
+
+BEGIN
+
+    SELECT * INTO attr_def FROM vandelay.import_item_attr_definition WHERE id = attr_def_id;
+
+    IF FOUND THEN
+
+        attr_set.definition := attr_def.id; 
+    
+        -- Build the combined XPath
+    
+        owning_lib :=
+            CASE
+                WHEN attr_def.owning_lib IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.owning_lib ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.owning_lib || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.owning_lib
+            END;
+    
+        circ_lib :=
+            CASE
+                WHEN attr_def.circ_lib IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.circ_lib ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.circ_lib || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.circ_lib
+            END;
+    
+        call_number :=
+            CASE
+                WHEN attr_def.call_number IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.call_number ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.call_number || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.call_number
+            END;
+    
+        copy_number :=
+            CASE
+                WHEN attr_def.copy_number IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.copy_number ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.copy_number || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.copy_number
+            END;
+    
+        status :=
+            CASE
+                WHEN attr_def.status IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.status ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.status || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.status
+            END;
+    
+        location :=
+            CASE
+                WHEN attr_def.location IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.location ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.location || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.location
+            END;
+    
+        circulate :=
+            CASE
+                WHEN attr_def.circulate IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.circulate ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.circulate || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.circulate
+            END;
+    
+        deposit :=
+            CASE
+                WHEN attr_def.deposit IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.deposit ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.deposit || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.deposit
+            END;
+    
+        deposit_amount :=
+            CASE
+                WHEN attr_def.deposit_amount IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.deposit_amount ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.deposit_amount || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.deposit_amount
+            END;
+    
+        ref :=
+            CASE
+                WHEN attr_def.ref IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.ref ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.ref || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.ref
+            END;
+    
+        holdable :=
+            CASE
+                WHEN attr_def.holdable IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.holdable ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.holdable || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.holdable
+            END;
+    
+        price :=
+            CASE
+                WHEN attr_def.price IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.price ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.price || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.price
+            END;
+    
+        barcode :=
+            CASE
+                WHEN attr_def.barcode IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.barcode ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.barcode || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.barcode
+            END;
+    
+        circ_modifier :=
+            CASE
+                WHEN attr_def.circ_modifier IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.circ_modifier ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.circ_modifier || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.circ_modifier
+            END;
+    
+        circ_as_type :=
+            CASE
+                WHEN attr_def.circ_as_type IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.circ_as_type ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.circ_as_type || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.circ_as_type
+            END;
+    
+        alert_message :=
+            CASE
+                WHEN attr_def.alert_message IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.alert_message ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.alert_message || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.alert_message
+            END;
+    
+        opac_visible :=
+            CASE
+                WHEN attr_def.opac_visible IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.opac_visible ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.opac_visible || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.opac_visible
+            END;
+
+        pub_note :=
+            CASE
+                WHEN attr_def.pub_note IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.pub_note ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.pub_note || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.pub_note
+            END;
+        priv_note :=
+            CASE
+                WHEN attr_def.priv_note IS NULL THEN &#39;null()&#39;
+                WHEN LENGTH( attr_def.priv_note ) = 1 THEN &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*[@code=&quot;&#39; || attr_def.priv_note || &#39;&quot;]&#39;
+                ELSE &#39;//*[@tag=&quot;&#39; || attr_def.tag || &#39;&quot;]/*&#39; || attr_def.priv_note
+            END;
+    
+    
+        xpath := 
+            owning_lib      || &#39;|&#39; || 
+            circ_lib        || &#39;|&#39; || 
+            call_number     || &#39;|&#39; || 
+            copy_number     || &#39;|&#39; || 
+            status          || &#39;|&#39; || 
+            location        || &#39;|&#39; || 
+            circulate       || &#39;|&#39; || 
+            deposit         || &#39;|&#39; || 
+            deposit_amount  || &#39;|&#39; || 
+            ref             || &#39;|&#39; || 
+            holdable        || &#39;|&#39; || 
+            price           || &#39;|&#39; || 
+            barcode         || &#39;|&#39; || 
+            circ_modifier   || &#39;|&#39; || 
+            circ_as_type    || &#39;|&#39; || 
+            alert_message   || &#39;|&#39; || 
+            pub_note        || &#39;|&#39; || 
+            priv_note       || &#39;|&#39; || 
+            opac_visible;
+
+        -- RAISE NOTICE &#39;XPath: %&#39;, xpath;
+        
+        FOR tmp_attr_set IN
+                SELECT  *
+                  FROM  xpath_table( &#39;id&#39;, &#39;marc&#39;, &#39;vandelay.queued_bib_record&#39;, xpath, &#39;id = &#39; || import_id )
+                            AS t( id BIGINT, ol TEXT, clib TEXT, cn TEXT, cnum TEXT, cs TEXT, cl TEXT, circ TEXT,
+                                  dep TEXT, dep_amount TEXT, r TEXT, hold TEXT, pr TEXT, bc TEXT, circ_mod TEXT,
+                                  circ_as TEXT, amessage TEXT, note TEXT, pnote TEXT, opac_vis TEXT )
+        LOOP
+    
+            tmp_attr_set.pr = REGEXP_REPLACE(tmp_attr_set.pr, E&#39;[^0-9\\.]&#39;, &#39;&#39;, &#39;g&#39;);
+            tmp_attr_set.dep_amount = REGEXP_REPLACE(tmp_attr_set.dep_amount, E&#39;[^0-9\\.]&#39;, &#39;&#39;, &#39;g&#39;);
+
+            tmp_attr_set.pr := NULLIF( tmp_attr_set.pr, &#39;&#39; );
+            tmp_attr_set.dep_amount := NULLIF( tmp_attr_set.dep_amount, &#39;&#39; );
+    
+            SELECT id INTO attr_set.owning_lib FROM actor.org_unit WHERE shortname = UPPER(tmp_attr_set.ol); -- INT
+            SELECT id INTO attr_set.circ_lib FROM actor.org_unit WHERE shortname = UPPER(tmp_attr_set.clib); -- INT
+            SELECT id INTO attr_set.status FROM config.copy_status WHERE LOWER(name) = LOWER(tmp_attr_set.cs); -- INT
+    
+            SELECT  id INTO attr_set.location
+              FROM  asset.copy_location
+              WHERE LOWER(name) = LOWER(tmp_attr_set.cl)
+                    AND asset.copy_location.owning_lib = COALESCE(attr_set.owning_lib, attr_set.circ_lib); -- INT
+    
+            attr_set.circulate      :=
+                LOWER( SUBSTRING( tmp_attr_set.circ, 1, 1)) IN (&#39;t&#39;,&#39;y&#39;,&#39;1&#39;)
+                OR LOWER(tmp_attr_set.circ) = &#39;circulating&#39;; -- BOOL
+
+            attr_set.deposit        :=
+                LOWER( SUBSTRING( tmp_attr_set.dep, 1, 1 ) ) IN (&#39;t&#39;,&#39;y&#39;,&#39;1&#39;)
+                OR LOWER(tmp_attr_set.dep) = &#39;deposit&#39;; -- BOOL
+
+            attr_set.holdable       :=
+                LOWER( SUBSTRING( tmp_attr_set.hold, 1, 1 ) ) IN (&#39;t&#39;,&#39;y&#39;,&#39;1&#39;)
+                OR LOWER(tmp_attr_set.hold) = &#39;holdable&#39;; -- BOOL
+
+            attr_set.opac_visible   :=
+                LOWER( SUBSTRING( tmp_attr_set.opac_vis, 1, 1 ) ) IN (&#39;t&#39;,&#39;y&#39;,&#39;1&#39;)
+                OR LOWER(tmp_attr_set.opac_vis) = &#39;visible&#39;; -- BOOL
+
+            attr_set.ref            :=
+                LOWER( SUBSTRING( tmp_attr_set.r, 1, 1 ) ) IN (&#39;t&#39;,&#39;y&#39;,&#39;1&#39;)
+                OR LOWER(tmp_attr_set.r) = &#39;reference&#39;; -- BOOL
+    
+            attr_set.copy_number    := tmp_attr_set.cnum::INT; -- INT,
+            attr_set.deposit_amount := tmp_attr_set.dep_amount::NUMERIC(6,2); -- NUMERIC(6,2),
+            attr_set.price          := tmp_attr_set.pr::NUMERIC(8,2); -- NUMERIC(8,2),
+    
+            attr_set.call_number    := tmp_attr_set.cn; -- TEXT
+            attr_set.barcode        := tmp_attr_set.bc; -- TEXT,
+            attr_set.circ_modifier  := tmp_attr_set.circ_mod; -- TEXT,
+            attr_set.circ_as_type   := tmp_attr_set.circ_as; -- TEXT,
+            attr_set.alert_message  := tmp_attr_set.amessage; -- TEXT,
+            attr_set.pub_note       := tmp_attr_set.note; -- TEXT,
+            attr_set.priv_note      := tmp_attr_set.pnote; -- TEXT,
+            attr_set.alert_message  := tmp_attr_set.amessage; -- TEXT,
+    
+            RETURN NEXT attr_set;
+    
+        END LOOP;
+    
+    END IF;
+
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.match-bib-record">match_bib_record()</a>
+		</h2>
+<h3>Returns: trigger</h3>
+<h3>Language: PLPGSQL</h3>
+        
+        <pre>
+DECLARE
+    attr    RECORD;
+    eg_rec  RECORD;
+BEGIN
+    FOR attr IN SELECT a.* FROM vandelay.queued_bib_record_attr a JOIN vandelay.bib_attr_definition d ON (d.id = a.field) WHERE record = NEW.id AND d.ident IS TRUE LOOP
+
+		-- All numbers? check for an id match
+		IF (attr.attr_value ~ $r$^\d+$$r$) THEN
+	        FOR eg_rec IN SELECT * FROM biblio.record_entry WHERE id = attr.attr_value::BIGINT AND deleted IS FALSE LOOP
+		        INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;id&#39;, attr.id, NEW.id, eg_rec.id);
+			END LOOP;
+		END IF;
+
+		-- Looks like an ISBN? check for an isbn match
+		IF (attr.attr_value ~* $r$^[0-9x]+$$r$ AND character_length(attr.attr_value) IN (10,13)) THEN
+	        FOR eg_rec IN EXECUTE $$SELECT * FROM metabib.full_rec fr WHERE fr.value LIKE LOWER(&#39;$$ || attr.attr_value || $$%&#39;) AND fr.tag = &#39;020&#39; AND fr.subfield = &#39;a&#39;$$ LOOP
+				PERFORM id FROM biblio.record_entry WHERE id = eg_rec.record AND deleted IS FALSE;
+				IF FOUND THEN
+			        INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;isbn&#39;, attr.id, NEW.id, eg_rec.record);
+				END IF;
+			END LOOP;
+
+			-- subcheck for isbn-as-tcn
+		    FOR eg_rec IN SELECT * FROM biblio.record_entry WHERE tcn_value = &#39;i&#39; || attr.attr_value AND deleted IS FALSE LOOP
+			    INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;tcn_value&#39;, attr.id, NEW.id, eg_rec.id);
+	        END LOOP;
+		END IF;
+
+		-- check for an OCLC tcn_value match
+		IF (attr.attr_value ~ $r$^o\d+$$r$) THEN
+		    FOR eg_rec IN SELECT * FROM biblio.record_entry WHERE tcn_value = regexp_replace(attr.attr_value,&#39;^o&#39;,&#39;ocm&#39;) AND deleted IS FALSE LOOP
+			    INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;tcn_value&#39;, attr.id, NEW.id, eg_rec.id);
+	        END LOOP;
+		END IF;
+
+		-- check for a direct tcn_value match
+        FOR eg_rec IN SELECT * FROM biblio.record_entry WHERE tcn_value = attr.attr_value AND deleted IS FALSE LOOP
+            INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;tcn_value&#39;, attr.id, NEW.id, eg_rec.id);
+        END LOOP;
+
+		-- check for a direct item barcode match
+        FOR eg_rec IN
+                SELECT  DISTINCT b.*
+                  FROM  biblio.record_entry b
+                        JOIN asset.call_number cn ON (cn.record = b.id)
+                        JOIN asset.copy cp ON (cp.call_number = cn.id)
+                  WHERE cp.barcode = attr.attr_value AND cp.deleted IS FALSE
+        LOOP
+            INSERT INTO vandelay.bib_match (field_type, matched_attr, queued_record, eg_record) VALUES (&#39;id&#39;, attr.id, NEW.id, eg_rec.id);
+        END LOOP;
+
+    END LOOP;
+
+    RETURN NULL;
+END;
+</pre>
+	
+		<hr>
+		<h2>Function:
+			<a href="#vandelay.schema">vandelay</a>.<a name="vandelay.function.strip-field-field-text-xml-text">strip_field(field text, xml text)</a>
+		</h2>
+<h3>Returns: text</h3>
+<h3>Language: PLPERLU</h3>
+        
+        <pre>
+
+    use MARC::Record;
+    use MARC::File::XML;
+
+    my $xml = shift;
+    my $field_spec = shift;
+
+    my $r = MARC::Record-&gt;new_from_xml( $xml );
+    $r-&gt;delete_field( $_ ) for ( $r-&gt;field( $field_spec ) );
+
+    $xml = $r-&gt;as_xml_record;
+    $xml =~ s/^&lt;\?.+?\?&gt;$//mo;
+    $xml =~ s/\n//sgo;
+    $xml =~ s/&gt;\s+&lt;/&gt;&lt;/sgo;
+
+    return $xml;
+
+</pre>
+	
+
+
+<p class="w3ref">Generated by <a href="http://www.rbt.ca/autodoc/">PostgreSQL Autodoc</a></p>
+<p class="w3ref"><a href="http://validator.w3.org/check/referer">W3C HTML 4.01 Strict</a></p>
+</body></html>



More information about the open-ils-commits mailing list