Dumped on 2009-02-24

Index of database - sparkle


Schema action


Table: action.aged_circulation

action.aged_circulation Structure
F-Key Name Type Description
usr_post_code text
usr_home_ou integer NOT NULL
usr_profile integer NOT NULL
usr_birth_year integer
copy_call_number integer NOT NULL
copy_location integer NOT NULL
copy_owning_lib integer NOT NULL
copy_circ_lib integer NOT NULL
copy_bib_record bigint NOT NULL
id bigint PRIMARY KEY
xact_start timestamp with time zone NOT NULL
xact_finish timestamp with time zone
target_copy bigint NOT NULL
circ_lib integer NOT NULL
circ_staff integer NOT NULL
checkin_staff integer
checkin_lib integer
renewal_remaining integer NOT NULL
due_date timestamp with time zone
stop_fines_time timestamp with time zone
checkin_time timestamp with time zone
duration interval
fine_interval interval NOT NULL
recuring_fine numeric(6,2)
max_fine numeric(6,2)
phone_renewal boolean NOT NULL
desk_renewal boolean NOT NULL
opac_renewal boolean NOT NULL
duration_rule text NOT NULL
recuring_fine_rule text NOT NULL
max_fine_rule text NOT NULL
stop_fines text
unrecovered boolean
create_time timestamp with time zone

Index - Schema action


View: action.all_circulation

action.all_circulation Structure
F-Key Name Type Description
id bigint
usr_post_code text
usr_home_ou integer
usr_profile integer
usr_birth_year integer
copy_call_number bigint
copy_location integer
copy_owning_lib integer
copy_circ_lib integer
copy_bib_record bigint
xact_start timestamp with time zone
xact_finish timestamp with time zone
target_copy bigint
circ_lib integer
circ_staff integer
checkin_staff integer
checkin_lib integer
renewal_remaining integer
due_date timestamp with time zone
stop_fines_time timestamp with time zone
checkin_time timestamp with time zone
create_time timestamp with time zone
duration interval
fine_interval interval
recuring_fine numeric
max_fine numeric
phone_renewal boolean
desk_renewal boolean
opac_renewal boolean
duration_rule text
recuring_fine_rule text
max_fine_rule text
stop_fines text
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 ALLSELECT 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
     ('year'::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)
     )
);

Index - Schema action


View: action.billable_cirulations

action.billable_cirulations Structure
F-Key Name Type Description
id bigint
usr integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
target_copy bigint
circ_lib integer
circ_staff integer
checkin_staff integer
checkin_lib integer
renewal_remaining integer
due_date timestamp with time zone
stop_fines_time timestamp with time zone
checkin_time timestamp with time zone
duration interval
fine_interval interval
recuring_fine numeric(6,2)
max_fine numeric(6,2)
phone_renewal boolean
desk_renewal boolean
opac_renewal boolean
duration_rule text
recuring_fine_rule text
max_fine_rule text
stop_fines text
SELECT circulation.id
, circulation.usr
, circulation.xact_start
, circulation.xact_finish
, 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.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);

 

Permissions which apply to action.billable_cirulations
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.circulation

action.circulation Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('money.billable_xact_id_seq'::regclass)
actor.usr.id usr integer NOT NULL
xact_start timestamp with time zone NOT NULL DEFAULT now()
xact_finish timestamp with time zone
asset.copy.id target_copy bigint NOT NULL
actor.org_unit.id circ_lib integer NOT NULL
circ_staff integer NOT NULL
checkin_staff integer
checkin_lib integer
renewal_remaining integer NOT NULL
due_date timestamp with time zone
stop_fines_time timestamp with time zone
checkin_time timestamp with time zone
duration interval
fine_interval interval NOT NULL DEFAULT '1 day'::interval
recuring_fine numeric(6,2)
max_fine numeric(6,2)
phone_renewal boolean NOT NULL DEFAULT false
desk_renewal boolean NOT NULL DEFAULT false
opac_renewal boolean NOT NULL DEFAULT false
duration_rule text NOT NULL
recuring_fine_rule text NOT NULL
max_fine_rule text NOT NULL
stop_fines text
unrecovered boolean
create_time timestamp with time zone DEFAULT now()

 

action.circulation Constraints
Name Constraint
circulation_stop_fines_check CHECK (((((((stop_fines = 'CHECKIN'::text) OR (stop_fines = 'CLAIMSRETURNED'::text)) OR (stop_fines = 'LOST'::text)) OR (stop_fines = 'MAXFINES'::text)) OR (stop_fines = 'RENEW'::text)) OR (stop_fines = 'LONGOVERDUE'::text)))

 

Permissions which apply to action.circulation
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.hold_copy_map

action.hold_copy_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
action.hold_request.id hold integer UNIQUE#1 NOT NULL
asset.copy.id target_copy bigint UNIQUE#1 NOT NULL

 

Permissions which apply to action.hold_copy_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.hold_notification

action.hold_notification Structure
F-Key Name Type Description
id serial PRIMARY KEY
action.hold_request.id hold integer NOT NULL
actor.usr.id notify_staff integer
notify_time timestamp with time zone NOT NULL DEFAULT now()
method text NOT NULL
note text

 

Permissions which apply to action.hold_notification
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.hold_request

action.hold_request Structure
F-Key Name Type Description
id serial PRIMARY KEY
request_time timestamp with time zone NOT NULL DEFAULT now()
capture_time timestamp with time zone
fulfillment_time timestamp with time zone
checkin_time timestamp with time zone
return_time timestamp with time zone
prev_check_time timestamp with time zone
expire_time timestamp with time zone
cancel_time timestamp with time zone
target bigint NOT NULL
asset.copy.id current_copy bigint
actor.usr.id fulfillment_staff integer
actor.org_unit.id fulfillment_lib integer
actor.org_unit.id request_lib integer NOT NULL
actor.usr.id requestor integer NOT NULL
actor.usr.id usr integer NOT NULL
selection_ou integer NOT NULL
selection_depth integer NOT NULL
actor.org_unit.id pickup_lib integer NOT NULL
hold_type text NOT NULL
holdable_formats text
phone_notify text
email_notify boolean NOT NULL DEFAULT true
frozen boolean NOT NULL DEFAULT false
thaw_date timestamp with time zone

 

action.hold_request Constraints
Name Constraint
hold_request_hold_type_check CHECK (((((hold_type = 'M'::text) OR (hold_type = 'T'::text)) OR (hold_type = 'V'::text)) OR (hold_type = 'C'::text)))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to action.hold_request
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.hold_transit_copy

action.hold_transit_copy Structure
F-Key Name Type Description
id integer PRIMARY KEY DEFAULT nextval('transit_copy_id_seq'::regclass)
source_send_time timestamp with time zone
dest_recv_time timestamp with time zone
asset.copy.id target_copy bigint NOT NULL
source integer NOT NULL
dest integer NOT NULL
prev_hop integer
copy_status integer NOT NULL
persistant_transfer boolean NOT NULL DEFAULT false
action.hold_request.id hold integer

 

Permissions which apply to action.hold_transit_copy
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.in_house_use

action.in_house_use Structure
F-Key Name Type Description
id serial PRIMARY KEY
asset.copy.id item bigint NOT NULL
actor.usr.id staff integer NOT NULL
actor.org_unit.id org_unit integer NOT NULL
use_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to action.in_house_use
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.non_cat_in_house_use

action.non_cat_in_house_use Structure
F-Key Name Type Description
id serial PRIMARY KEY
config.non_cataloged_type.id item_type bigint NOT NULL
actor.usr.id staff integer NOT NULL
actor.org_unit.id org_unit integer NOT NULL
use_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to action.non_cat_in_house_use
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.non_cataloged_circulation

action.non_cataloged_circulation Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id patron integer NOT NULL
actor.usr.id staff integer NOT NULL
actor.org_unit.id circ_lib integer NOT NULL
config.non_cataloged_type.id item_type integer NOT NULL
circ_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to action.non_cataloged_circulation
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


View: action.open_circ_count_by_circ_mod

action.open_circ_count_by_circ_mod Structure
F-Key Name Type Description
usr integer
circ_modifier text
count bigint
SELECT circ.usr
, cp.circ_modifier
, count
(circ.id) AS count 
FROM ("action".circulation circ 
  JOIN asset."copy" cp 
    ON (
           (circ.target_copy = cp.id)
     )
)
WHERE (
     (circ.checkin_time IS NULL)
   AND (
           (
                 (
                       (circ.stop_fines = 'LOST'::text)
                      OR (circ.stop_fines = 
                 'LONGOVERDUE'::text
                       )
                 )
                OR (circ.stop_fines = 'CLAIMSRETURNED'::text)
           )
          OR (circ.stop_fines IS NULL)
     )
)
GROUP BY circ.usr
, cp.circ_modifier;

Index - Schema action


View: action.open_circulation

action.open_circulation Structure
F-Key Name Type Description
id bigint
usr integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
target_copy bigint
circ_lib integer
circ_staff integer
checkin_staff integer
checkin_lib integer
renewal_remaining integer
due_date timestamp with time zone
stop_fines_time timestamp with time zone
checkin_time timestamp with time zone
duration interval
fine_interval interval
recuring_fine numeric(6,2)
max_fine numeric(6,2)
phone_renewal boolean
desk_renewal boolean
opac_renewal boolean
duration_rule text
recuring_fine_rule text
max_fine_rule text
stop_fines text
SELECT circulation.id
, circulation.usr
, circulation.xact_start
, circulation.xact_finish
, 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.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;

 

Permissions which apply to action.open_circulation
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.survey

action.survey Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id owner integer NOT NULL
start_date timestamp with time zone NOT NULL DEFAULT now()
end_date timestamp with time zone NOT NULL DEFAULT (now() + '10 years'::interval)
usr_summary boolean NOT NULL DEFAULT false
opac boolean NOT NULL DEFAULT false
poll boolean NOT NULL DEFAULT false
required boolean NOT NULL DEFAULT false
name text NOT NULL
description text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to action.survey
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.survey_answer

action.survey_answer Structure
F-Key Name Type Description
id serial PRIMARY KEY
action.survey_question.id question integer NOT NULL
answer text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to action.survey_answer
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.survey_question

action.survey_question Structure
F-Key Name Type Description
id serial PRIMARY KEY
action.survey.id survey integer NOT NULL
question text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to action.survey_question
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.survey_response

action.survey_response Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
response_group_id integer
usr integer
action.survey.id survey integer NOT NULL
action.survey_question.id question integer NOT NULL
action.survey_answer.id answer integer NOT NULL
answer_date timestamp with time zone
effective_date timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to action.survey_response
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.transit_copy

action.transit_copy Structure
F-Key Name Type Description
id serial PRIMARY KEY
source_send_time timestamp with time zone
dest_recv_time timestamp with time zone
asset.copy.id target_copy bigint NOT NULL
actor.org_unit.id source integer NOT NULL
actor.org_unit.id dest integer NOT NULL
action.transit_copy.id prev_hop integer
config.copy_status.id copy_status integer NOT NULL
persistant_transfer boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to action.transit_copy
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Table: action.unfulfilled_hold_list

action.unfulfilled_hold_list Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
current_copy bigint NOT NULL
hold integer NOT NULL
circ_lib integer NOT NULL
fail_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to action.unfulfilled_hold_list
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema action


Function: action.age_circ_on_delete( )

Returns: "trigger"

Language: PLPGSQL

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;

Function: action.circulation_claims_returned( )

Returns: "trigger"

Language: PLPGSQL

BEGIN
	IF OLD.stop_fines IS NULL OR OLD.stop_fines <> NEW.stop_fines THEN
		IF NEW.stop_fines = 'CLAIMSRETURNED' THEN
			UPDATE actor.usr SET claims_returned_count = claims_returned_count + 1 WHERE id = NEW.usr;
		END IF;
		IF NEW.stop_fines = 'LOST' THEN
			UPDATE asset.copy SET status = 3 WHERE id = NEW.target_copy;
		END IF;
	END IF;
	RETURN NEW;
END;

Function: action.find_circ_matrix_matchpoint( context_ou integer, match_item bigint, match_user integer, renewal boolean )

Returns: integer

Language: PLPGSQL

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 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 <> item_object.circ_modifier;
			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 <> item_object.circ_as_type;
				ELSE
					CONTINUE WHEN current_mp.marc_type <> rec_descriptor.item_type;
				END IF;
			END IF;

			IF current_mp.marc_form IS NOT NULL THEN
				CONTINUE WHEN current_mp.marc_form <> rec_descriptor.item_form;
			END IF;

			IF current_mp.marc_vr_format IS NOT NULL THEN
				CONTINUE WHEN current_mp.marc_vr_format <> rec_descriptor.vr_format;
			END IF;

			IF current_mp.ref_flag IS NOT NULL THEN
				CONTINUE WHEN current_mp.ref_flag <> item_object.ref;
			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 < 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 > 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.id;
END;

Function: action.find_hold_matrix_matchpoint( pickup_ou integer, request_ou integer, match_item bigint, match_user integer, match_requestor integer )

Returns: integer

Language: PLPGSQL

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.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 <> item_object.circ_modifier;
			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 <> item_object.circ_as_type;
				ELSE
					CONTINUE WHEN current_mp.marc_type <> rec_descriptor.item_type;
				END IF;
			END IF;

			IF current_mp.marc_form IS NOT NULL THEN
				CONTINUE WHEN current_mp.marc_form <> rec_descriptor.item_form;
			END IF;

			IF current_mp.marc_vr_format IS NOT NULL THEN
				CONTINUE WHEN current_mp.marc_vr_format <> rec_descriptor.vr_format;
			END IF;

			IF current_mp.ref_flag IS NOT NULL THEN
				CONTINUE WHEN current_mp.ref_flag <> 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 <> 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 <> 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 <> 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 <> 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 <> 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 > 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;

Function: action.hold_request_permit_test( pickup_ou integer, request_ou integer, match_item bigint, match_user integer, match_requestor integer )

Returns: SET OF "action".matrix_test_result

Language: PLPGSQL

DECLARE
	matchpoint_id		INT;
	user_object		actor.usr%ROWTYPE;
	age_protect_object	config.rule_age_hold_protect%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_test%ROWTYPE;
	hold_count		INT;
	hold_transit_prox	INT;
	frozen_hold_count	INT;
	patron_penalties	INT;
	done			BOOL := FALSE;
BEGIN
	SELECT INTO user_object * FROM actor.usr WHERE id = match_user;

	-- Fail if we couldn't find a user
	IF user_object.id IS NULL THEN
		result.fail_part := 'no_user';
		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 := 'actor.usr.barred';
		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't find a copy
	IF item_object.id IS NULL THEN
		result.fail_part := 'no_item';
		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't find any matchpoint (requires a default)
	IF matchpoint_id IS NULL THEN
		result.fail_part := 'no_matchpoint';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
		RETURN;
	END IF;

	SELECT INTO hold_test * FROM config.hold_matrix_test WHERE matchpoint = matchpoint_id;

	result.matchpoint := matchpoint_id;
	result.success := TRUE;

	IF hold_test.holdable IS FALSE THEN
		result.fail_part := 'config.hold_matrix_test.holdable';
		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 := 'transit_range';
			result.success := FALSE;
			done := TRUE;
			RETURN NEXT result;
		END IF;
	END IF;

	IF hold_test.stop_blocked_user IS TRUE THEN
		SELECT	INTO patron_penalties COUNT(*)
		  FROM	actor.usr_standing_penalty
		  WHERE	usr = match_user;

		IF items_out > 0 THEN
			result.fail_part := 'config.hold_matrix_test.stop_blocked_user';
			result.success := FALSE;
			done := TRUE;
			RETURN NEXT result;
		END IF;
	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 items_out >= hold_test.max_holds THEN
			result.fail_part := 'config.hold_matrix_test.max_holds';
			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 > 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 > age_protect_object.prox THEN
				result.fail_part := 'config.rule_age_hold_protect.prox';
				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;

Function: action.item_user_circ_test( circ_ou integer, match_item bigint, match_user integer, renewal boolean )

Returns: SET OF "action".matrix_test_result

Language: PLPGSQL

DECLARE
	matchpoint_id		INT;
	user_object		actor.usr%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_test%ROWTYPE;
	out_by_circ_mod		config.circ_matrix_circ_mod_test%ROWTYPE;
	items_out		INT;
	items_overdue		INT;
	overdue_orgs		INT[];
	current_fines		NUMERIC(8,2) := 0.0;
	tmp_fines		NUMERIC(8,2);
	tmp_groc		RECORD;
	tmp_circ		RECORD;
	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't find a user
	IF user_object.id IS NULL THEN
		result.fail_part := 'no_user';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
		RETURN;
	END IF;

	IF user_object.barred IS TRUE THEN
		result.fail_part := 'actor.usr.barred';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	END IF;

	-- Fail if the item can't circulate
	SELECT INTO item_object * FROM asset.copy WHERE id = match_item;
	IF item_object.circulate IS FALSE THEN
		result.fail_part := 'asset.copy.circulate';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	END IF;

	-- Fail if the item isn'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 := 'asset.copy.status';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	ELSIF renewal AND item_object.status <> 1 THEN
		result.fail_part := 'asset.copy.status';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	END IF;

	-- Fail if the item can'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 := 'asset.copy_location.circulate';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	END IF;

	SELECT INTO matchpoint_id action.find_circ_matrix_matchpoint(circ_ou, match_item, match_user, renewal);
	result.matchpoint := matchpoint_id;

	SELECT INTO circ_test * from config.circ_matrix_test WHERE matchpoint = result.matchpoint;

	IF circ_test.org_depth IS NOT NULL THEN
		SELECT INTO overdue_orgs ARRAY_ACCUM(id) FROM actor.org_unit_descendants( circ_ou, circ_test.org_depth );
	END IF; 

	-- Fail if we couldn't find a set of tests
	IF result.matchpoint IS NULL THEN
		result.fail_part := 'no_matchpoint';
		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 := 'config.circ_matrix_test.circulate';
		result.success := FALSE;
		done := TRUE;
		RETURN NEXT result;
	END IF;

	-- Fail if the user has too many items checked out
	IF circ_test.max_items_out IS NOT NULL THEN
    	SELECT  INTO items_out COUNT(*)
          FROM  action.circulation
          WHERE usr = match_user
                AND (circ_test.org_depth IS NULL OR (circ_test.org_depth IS NOT NULL AND circ_lib IN ( SELECT * FROM explode_array(overdue_orgs) )))
                AND checkin_time IS NULL
                AND (stop_fines IN ('MAXFINES','LONGOVERDUE') OR stop_fines IS NULL);
	   	IF items_out >= circ_test.max_items_out THEN
		    	result.fail_part := 'config.circ_matrix_test.max_items_out';
			result.success := FALSE;
			done := TRUE;
	   		RETURN NEXT result;
   		END IF;
	END IF;

	-- 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 = matchpoint_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_test.org_depth IS NULL OR (circ_test.org_depth IS NOT NULL AND circ_lib IN ( SELECT * FROM explode_array(overdue_orgs) )))
			AND circ.checkin_time IS NULL
			AND (circ.stop_fines IN ('MAXFINES','LONGOVERDUE') OR circ.stop_fines IS NULL)
			AND cp.circ_modifier = out_by_circ_mod.circ_mod;
		IF items_out >= out_by_circ_mod.items_out THEN
			result.fail_part := 'config.circ_matrix_circ_mod_test';
			result.success := FALSE;
			done := TRUE;
			RETURN NEXT result;
		END IF;
	END LOOP;

	-- Fail if the user has too many overdue items
	IF circ_test.max_overdue IS NOT NULL THEN
		SELECT  INTO items_overdue COUNT(*)
		  FROM  action.circulation
		  WHERE usr = match_user
                	AND (circ_test.org_depth IS NULL OR (circ_test.org_depth IS NOT NULL AND circ_lib IN ( SELECT * FROM explode_array(overdue_orgs) )))
			AND checkin_time IS NULL
			AND due_date < NOW()
			 AND (stop_fines IN ('MAXFINES','LONGOVERDUE') OR stop_fines IS NULL);
		IF items_overdue >= circ_test.max_overdue THEN
			result.fail_part := 'config.circ_matrix_test.max_overdue';
			result.success := FALSE;
			done := TRUE;
			RETURN NEXT result;
		END IF;
	END IF;

	-- Fail if the user has a high fine balance
	IF circ_test.max_fines IS NOT NULL THEN
		FOR tmp_groc IN SELECT * FROM money.grocery WHERE usr = match_usr AND xact_finish IS NULL AND (circ_test.org_depth IS NULL OR (circ_test.org_depth IS NOT NULL AND billing_location IN ( SELECT * FROM explode_array(overdue_orgs) ))) LOOP
			SELECT INTO tmp_fines SUM( amount ) FROM money.billing WHERE xact = tmp_groc.id AND NOT voided;
			current_fines = current_fines + COALESCE(tmp_fines, 0.0);
			SELECT INTO tmp_fines SUM( amount ) FROM money.payment WHERE xact = tmp_groc.id AND NOT voided;
			current_fines = current_fines - COALESCE(tmp_fines, 0.0);
		END LOOP;

		FOR tmp_circ IN SELECT * FROM action.circulation WHERE usr = match_usr AND xact_finish IS NULL AND (circ_test.org_depth IS NULL OR (circ_test.org_depth IS NOT NULL AND circ_lib IN ( SELECT * FROM explode_array(overdue_orgs) ))) LOOP
			SELECT INTO tmp_fines SUM( amount ) FROM money.billing WHERE xact = tmp_circ.id AND NOT voided;
			current_fines = current_fines + COALESCE(tmp_fines, 0.0);
			SELECT INTO tmp_fines SUM( amount ) FROM money.payment WHERE xact = tmp_circ.id AND NOT voided;
			current_fines = current_fines - COALESCE(tmp_fines, 0.0);
		END LOOP;

		IF current_fines >= circ_test.max_fines THEN
			result.fail_part := 'config.circ_matrix_test.max_fines';
			result.success := FALSE;
			RETURN NEXT result;
			done := TRUE;
		END IF;
	END IF;

	-- If we passed everything, return the successful matchpoint id
	IF NOT done THEN
		RETURN NEXT result;
	END IF;

	RETURN;
END;

Function: action.item_user_circ_test( integer, bigint, integer )

Returns: SET OF "action".matrix_test_result

Language: SQL

	SELECT * FROM action.item_user_circ_test( $1, $2, $3, FALSE );

Function: action.item_user_renew_test( integer, bigint, integer )

Returns: SET OF "action".matrix_test_result

Language: SQL

	SELECT * FROM action.item_user_circ_test( $1, $2, $3, TRUE );

Function: action.survey_response_answer_date_fixup( )

Returns: "trigger"

Language: PLPGSQL

BEGIN
	NEW.answer_date := NOW();
	RETURN NEW;
END;

Schema actor

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander * * 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. */


Table: actor.card

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * Library Cards * * Each User has one or more library cards. The current "main" * 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. */

actor.card Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer NOT NULL
barcode text UNIQUE NOT NULL
active boolean NOT NULL DEFAULT true

 

Permissions which apply to actor.card
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.hours_of_operation

actor.hours_of_operation Structure
F-Key Name Type Description
actor.org_unit.id id integer PRIMARY KEY
dow_0_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_0_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_1_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_1_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_2_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_2_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_3_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_3_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_4_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_4_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_5_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_5_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone
dow_6_open time without time zone NOT NULL DEFAULT '09:00:00'::time without time zone
dow_6_close time without time zone NOT NULL DEFAULT '17:00:00'::time without time zone

 

Permissions which apply to actor.hours_of_operation
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_address

actor.org_address Structure
F-Key Name Type Description
id serial PRIMARY KEY
valid boolean NOT NULL DEFAULT true
address_type text NOT NULL DEFAULT 'MAILING'::text
actor.org_unit.id org_unit integer NOT NULL
street1 text NOT NULL
street2 text
city text NOT NULL
county text
state text NOT NULL
country text NOT NULL
post_code text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.org_address
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_lasso

actor.org_lasso Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE

Tables referencing this one via Foreign Key Constraints:

Index - Schema actor


Table: actor.org_lasso_map

actor.org_lasso_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_lasso.id lasso integer NOT NULL
actor.org_unit.id org_unit integer NOT NULL

Index - Schema actor


Table: actor.org_unit

actor.org_unit Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id parent_ou integer
actor.org_unit_type.id ou_type integer NOT NULL
actor.org_address.id ill_address integer
actor.org_address.id holds_address integer
actor.org_address.id mailing_address integer
actor.org_address.id billing_address integer
shortname text NOT NULL
name text NOT NULL
email text
phone text
opac_visible boolean NOT NULL DEFAULT true

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.org_unit
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_unit_closed

actor.org_unit_closed Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id org_unit integer NOT NULL
close_start timestamp with time zone NOT NULL
close_end timestamp with time zone NOT NULL
reason text

 

Permissions which apply to actor.org_unit_closed
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_unit_proximity

actor.org_unit_proximity Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
from_org integer
to_org integer
prox integer

 

Permissions which apply to actor.org_unit_proximity
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_unit_setting

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

actor.org_unit_setting Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.org_unit.id org_unit integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
value text NOT NULL

 

Permissions which apply to actor.org_unit_setting
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.org_unit_type

actor.org_unit_type Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text NOT NULL
opac_label text NOT NULL
depth integer NOT NULL
actor.org_unit_type.id parent integer
can_have_vols boolean NOT NULL DEFAULT true
can_have_users boolean NOT NULL DEFAULT true

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.org_unit_type
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.stat_cat

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * User Statistical Catagories * * Local data collected about Users is placed into a Statistical * Catagory. Here'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. */

actor.stat_cat Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id owner integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
opac_visible boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.stat_cat
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.stat_cat_entry

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * User Statistical Catagory Entries * * Local data collected about Users is placed into a Statistical * Catagory. Each library can create entries into any of it's own * stat_cats, it's anscestors stat_cats, or it's descendants' 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. */

actor.stat_cat_entry Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.stat_cat.id stat_cat integer UNIQUE#1 NOT NULL
actor.org_unit.id owner integer UNIQUE#1 NOT NULL
value text UNIQUE#1 NOT NULL

 

Permissions which apply to actor.stat_cat_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.stat_cat_entry_usr_map

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

actor.stat_cat_entry_usr_map Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
stat_cat_entry text NOT NULL
actor.stat_cat.id stat_cat integer UNIQUE#1 NOT NULL
actor.usr.id target_usr integer UNIQUE#1 NOT NULL

 

Permissions which apply to actor.stat_cat_entry_usr_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.usr

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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'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. */

actor.usr Structure
F-Key Name Type Description
id serial PRIMARY KEY
card integer UNIQUE
profile integer NOT NULL
usrname text UNIQUE NOT NULL
email text
passwd text NOT NULL
standing integer NOT NULL DEFAULT 1
config.identification_type.id ident_type integer NOT NULL
ident_value text
config.identification_type.id ident_type2 integer
ident_value2 text
config.net_access_level.id net_access_level integer NOT NULL DEFAULT 1
photo_url text
prefix text
first_given_name text NOT NULL
second_given_name text
family_name text NOT NULL
suffix text
day_phone text
evening_phone text
other_phone text
actor.usr_address.id mailing_address integer
actor.usr_address.id billing_address integer
actor.org_unit.id home_ou integer NOT NULL
dob timestamp with time zone
active boolean NOT NULL DEFAULT true
master_account boolean NOT NULL DEFAULT false
super_user boolean NOT NULL DEFAULT false
barred boolean NOT NULL DEFAULT false
deleted boolean NOT NULL DEFAULT false
usrgroup serial NOT NULL
claims_returned_count integer NOT NULL
credit_forward_balance numeric(6,2) NOT NULL DEFAULT 0.00
last_xact_id text NOT NULL DEFAULT 'none'::text
alert_message text
create_date timestamp with time zone NOT NULL DEFAULT now()
expire_date timestamp with time zone NOT NULL DEFAULT (now() + '3 years'::interval)

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.usr
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.usr_address

actor.usr_address Structure
F-Key Name Type Description
id serial PRIMARY KEY
valid boolean NOT NULL DEFAULT true
within_city_limits boolean NOT NULL DEFAULT true
address_type text NOT NULL DEFAULT 'MAILING'::text
actor.usr.id usr integer NOT NULL
street1 text NOT NULL
street2 text
city text NOT NULL
county text
state text NOT NULL
country text NOT NULL
post_code text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.usr_address
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.usr_note

actor.usr_note Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id usr bigint NOT NULL
actor.usr.id creator bigint NOT NULL
create_date timestamp with time zone DEFAULT now()
pub boolean NOT NULL DEFAULT false
title text NOT NULL
value text NOT NULL

 

Permissions which apply to actor.usr_note
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.usr_org_unit_opt_in

actor.usr_org_unit_opt_in Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id org_unit integer UNIQUE#1 NOT NULL
actor.usr.id usr integer UNIQUE#1 NOT NULL
actor.usr.id staff integer NOT NULL
opt_in_ts timestamp with time zone NOT NULL DEFAULT now()
actor.workstation.id opt_in_ws integer NOT NULL

Index - Schema actor


Table: actor.usr_setting

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

actor.usr_setting Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id usr integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
value text NOT NULL

 

Permissions which apply to actor.usr_setting
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.usr_standing_penalty

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

actor.usr_standing_penalty Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer NOT NULL
penalty_type text NOT NULL

 

Permissions which apply to actor.usr_standing_penalty
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Table: actor.workstation

actor.workstation Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
actor.org_unit.id owning_lib integer NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to actor.workstation
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema actor


Function: actor.crypt_pw_insert( )

Returns: "trigger"

Language: PLPGSQL

	BEGIN
		NEW.passwd = MD5( NEW.passwd );
		RETURN NEW;
	END;

Function: actor.crypt_pw_update( )

Returns: "trigger"

Language: PLPGSQL

	BEGIN
		IF NEW.passwd <> OLD.passwd THEN
			NEW.passwd = MD5( NEW.passwd );
		END IF;
		RETURN NEW;
	END;

Function: actor.org_unit_ancestor_at_depth( integer, integer )

Returns: org_unit

Language: SQL

	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);

Function: actor.org_unit_ancestors( integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	a.*
	  FROM	connectby('actor.org_unit'::text,'parent_ou'::text,'id'::text,'name'::text,$1::text,100,'.'::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;

Function: actor.org_unit_combined_ancestors( integer, integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	*
	  FROM	actor.org_unit_ancestors($1)
			UNION
	SELECT	*
	  FROM	actor.org_unit_ancestors($2);

Function: actor.org_unit_common_ancestors( integer, integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	*
	  FROM	actor.org_unit_ancestors($1)
			INTERSECT
	SELECT	*
	  FROM	actor.org_unit_ancestors($2);

Function: actor.org_unit_descendants( integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	a.*
	  FROM	connectby('actor.org_unit'::text,'id'::text,'parent_ou'::text,'name'::text,$1::text,100,'.'::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;

Function: actor.org_unit_descendants( integer, integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	a.*
	  FROM	connectby('actor.org_unit'::text,'id'::text,'parent_ou'::text,'name'::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,'.'::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;

Function: actor.org_unit_full_path( integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	*
	  FROM	actor.org_unit_ancestors($1)
			UNION
	SELECT	*
	  FROM	actor.org_unit_descendants($1);

Function: actor.org_unit_full_path( integer, integer )

Returns: SET OF org_unit

Language: SQL

	SELECT	* FROM actor.org_unit_full_path((actor.org_unit_ancestor_at_depth($1, $2)).id)

Function: actor.org_unit_proximity( integer, integer )

Returns: integer

Language: SQL

	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;

Schema asset


Table: asset.call_number

asset.call_number Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id creator bigint NOT NULL
create_date timestamp with time zone DEFAULT now()
actor.usr.id editor bigint NOT NULL
edit_date timestamp with time zone DEFAULT now()
biblio.record_entry.id record bigint NOT NULL
actor.org_unit.id owning_lib integer NOT NULL
label text NOT NULL
deleted boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.call_number
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.call_number_note

asset.call_number_note Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
asset.call_number.id call_number bigint NOT NULL
actor.usr.id creator bigint NOT NULL
create_date timestamp with time zone DEFAULT now()
pub boolean NOT NULL DEFAULT false
title text NOT NULL
value text NOT NULL

 

Permissions which apply to asset.call_number_note
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.copy

asset.copy Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.org_unit.id circ_lib integer NOT NULL
actor.usr.id creator bigint NOT NULL
asset.call_number.id call_number bigint NOT NULL
actor.usr.id editor bigint NOT NULL
create_date timestamp with time zone DEFAULT now()
edit_date timestamp with time zone DEFAULT now()
copy_number integer
config.copy_status.id status integer NOT NULL
asset.copy_location.id location integer NOT NULL DEFAULT 1
loan_duration integer NOT NULL
fine_level integer NOT NULL
age_protect integer
circulate boolean NOT NULL DEFAULT true
deposit boolean NOT NULL DEFAULT false
ref boolean NOT NULL DEFAULT false
holdable boolean NOT NULL DEFAULT true
deposit_amount numeric(6,2) NOT NULL DEFAULT 0.00
price numeric(8,2)
barcode text NOT NULL
config.circ_modifier.code circ_modifier text
circ_as_type text
dummy_title text
dummy_author text
alert_message text
opac_visible boolean NOT NULL DEFAULT true
deleted boolean NOT NULL DEFAULT false

 

asset.copy Constraints
Name Constraint
copy_fine_level_check CHECK ((((fine_level = 1) OR (fine_level = 2)) OR (fine_level = 3)))
copy_loan_duration_check CHECK ((((loan_duration = 1) OR (loan_duration = 2)) OR (loan_duration = 3)))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.copy
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.copy_location

asset.copy_location Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE#1 NOT NULL
actor.org_unit.id owning_lib integer UNIQUE#1 NOT NULL
holdable boolean NOT NULL DEFAULT true
opac_visible boolean NOT NULL DEFAULT true
circulate boolean NOT NULL DEFAULT true
hold_verify boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.copy_location
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.copy_note

asset.copy_note Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
asset.copy.id owning_copy bigint NOT NULL
actor.usr.id creator bigint NOT NULL
create_date timestamp with time zone DEFAULT now()
pub boolean NOT NULL DEFAULT false
title text NOT NULL
value text NOT NULL

 

Permissions which apply to asset.copy_note
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.copy_tranparency_map

asset.copy_tranparency_map Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
asset.copy_transparency.id tansparency integer NOT NULL
asset.copy.id target_copy integer UNIQUE NOT NULL

 

Permissions which apply to asset.copy_tranparency_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.copy_transparency

asset.copy_transparency Structure
F-Key Name Type Description
id serial PRIMARY KEY
deposit_amount numeric(6,2)
actor.org_unit.id owner integer UNIQUE#1 NOT NULL
actor.org_unit.id circ_lib integer
loan_duration integer
fine_level integer
holdable boolean
circulate boolean
deposit boolean
ref boolean
opac_visible boolean
circ_modifier text
circ_as_type text
name text UNIQUE#1 NOT NULL

 

asset.copy_transparency Constraints
Name Constraint
copy_transparency_fine_level_check CHECK ((((fine_level = 1) OR (fine_level = 2)) OR (fine_level = 3)))
copy_transparency_loan_duration_check CHECK ((((loan_duration = 1) OR (loan_duration = 2)) OR (loan_duration = 3)))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.copy_transparency
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.stat_cat

asset.stat_cat Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.org_unit.id owner integer UNIQUE#1 NOT NULL
opac_visible boolean NOT NULL DEFAULT false
name text UNIQUE#1 NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.stat_cat
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.stat_cat_entry

asset.stat_cat_entry Structure
F-Key Name Type Description
id serial PRIMARY KEY
asset.stat_cat.id stat_cat integer UNIQUE#1 NOT NULL
actor.org_unit.id owner integer UNIQUE#1 NOT NULL
value text UNIQUE#1 NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to asset.stat_cat_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.stat_cat_entry_copy_map

asset.stat_cat_entry_copy_map Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
asset.stat_cat.id stat_cat integer UNIQUE#1 NOT NULL
asset.stat_cat_entry.id stat_cat_entry integer NOT NULL
asset.copy.id owning_copy bigint UNIQUE#1 NOT NULL

 

Permissions which apply to asset.stat_cat_entry_copy_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Table: asset.stat_cat_entry_transparency_map

asset.stat_cat_entry_transparency_map Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
stat_cat integer UNIQUE#1 NOT NULL
stat_cat_entry integer NOT NULL
owning_transparency integer UNIQUE#1 NOT NULL

 

Permissions which apply to asset.stat_cat_entry_transparency_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema asset


Function: asset.merge_record_assets( target_record bigint, source_record bigint )

Returns: integer

Language: PLPGSQL

DECLARE
	moved_cns INT := 0;
	source_cn asset.call_number%ROWTYPE;
	target_cn asset.call_number%ROWTYPE;
BEGIN
	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;

		IF FOUND THEN
			UPDATE	asset.copy
			  SET	call_number = target_cn.id
			  WHERE	call_number = source_cn.id;
			DELETE FROM asset.call_number
			  WHERE id = target_cn.id;
		ELSE
			UPDATE	asset.call_number
			  SET	record = target_record
			  WHERE	id = source_cn.id;
		END IF;

		moved_cns := moved_cns + 1;
	END LOOP;

	RETURN moved_cns;
END;

Schema auditor


Table: auditor.actor_org_unit_history

auditor.actor_org_unit_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id integer NOT NULL
parent_ou integer
ou_type integer NOT NULL
ill_address integer
holds_address integer
mailing_address integer
billing_address integer
shortname text NOT NULL
name text NOT NULL
email text
phone text

 

Permissions which apply to auditor.actor_org_unit_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.actor_org_unit_lifecycle

auditor.actor_org_unit_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id integer
parent_ou integer
ou_type integer
ill_address integer
holds_address integer
mailing_address integer
billing_address integer
shortname text
name text
email text
phone text
SELECT now
() AS audit_time
,'C' 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 
FROM actor.org_unit 
UNION ALLSELECT 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 
FROM auditor.actor_org_unit_history;

 

Permissions which apply to auditor.actor_org_unit_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Table: auditor.actor_usr_address_history

auditor.actor_usr_address_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id integer NOT NULL
valid boolean NOT NULL
within_city_limits boolean NOT NULL
address_type text NOT NULL
usr integer NOT NULL
street1 text NOT NULL
street2 text
city text NOT NULL
county text
state text NOT NULL
country text NOT NULL
post_code text NOT NULL

 

Permissions which apply to auditor.actor_usr_address_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.actor_usr_address_lifecycle

auditor.actor_usr_address_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id integer
valid boolean
within_city_limits boolean
address_type text
usr integer
street1 text
street2 text
city text
county text
state text
country text
post_code text
SELECT now
() AS audit_time
,'C' 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 
FROM actor.usr_address 
UNION ALLSELECT 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 
FROM auditor.actor_usr_address_history;

 

Permissions which apply to auditor.actor_usr_address_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Table: auditor.actor_usr_history

auditor.actor_usr_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id integer NOT NULL
card integer
profile integer NOT NULL
usrname text NOT NULL
email text
passwd text NOT NULL
standing integer NOT NULL
ident_type integer NOT NULL
ident_value text
ident_type2 integer
ident_value2 text
net_access_level integer NOT NULL
photo_url text
prefix text
first_given_name text NOT NULL
second_given_name text
family_name text NOT NULL
suffix text
day_phone text
evening_phone text
other_phone text
mailing_address integer
billing_address integer
home_ou integer NOT NULL
dob timestamp with time zone
active boolean NOT NULL
master_account boolean NOT NULL
super_user boolean NOT NULL
barred boolean NOT NULL
deleted boolean NOT NULL
usrgroup integer NOT NULL
claims_returned_count integer NOT NULL
credit_forward_balance numeric(6,2) NOT NULL
last_xact_id text NOT NULL
alert_message text
create_date timestamp with time zone NOT NULL
expire_date timestamp with time zone NOT NULL

 

Permissions which apply to auditor.actor_usr_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.actor_usr_lifecycle

auditor.actor_usr_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id integer
card integer
profile integer
usrname text
email text
passwd text
standing integer
ident_type integer
ident_value text
ident_type2 integer
ident_value2 text
net_access_level integer
photo_url text
prefix text
first_given_name text
second_given_name text
family_name text
suffix text
day_phone text
evening_phone text
other_phone text
mailing_address integer
billing_address integer
home_ou integer
dob timestamp with time zone
active boolean
master_account boolean
super_user boolean
barred boolean
deleted boolean
usrgroup integer
claims_returned_count integer
credit_forward_balance numeric
last_xact_id text
alert_message text
create_date timestamp with time zone
expire_date timestamp with time zone
SELECT now
() AS audit_time
,'C' 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.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.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_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.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.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;

 

Permissions which apply to auditor.actor_usr_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Table: auditor.asset_call_number_history

auditor.asset_call_number_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id bigint NOT NULL
creator bigint NOT NULL
create_date timestamp with time zone
editor bigint NOT NULL
edit_date timestamp with time zone
record bigint NOT NULL
owning_lib integer NOT NULL
label text NOT NULL
deleted boolean NOT NULL

 

Permissions which apply to auditor.asset_call_number_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.asset_call_number_lifecycle

auditor.asset_call_number_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id bigint
creator bigint
create_date timestamp with time zone
editor bigint
edit_date timestamp with time zone
record bigint
owning_lib integer
label text
deleted boolean
SELECT now
() AS audit_time
,'C' 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_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;

 

Permissions which apply to auditor.asset_call_number_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Table: auditor.asset_copy_history

auditor.asset_copy_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id bigint NOT NULL
circ_lib integer NOT NULL
creator bigint NOT NULL
call_number bigint NOT NULL
editor bigint NOT NULL
create_date timestamp with time zone
edit_date timestamp with time zone
copy_number integer
status integer NOT NULL
location integer NOT NULL
loan_duration integer NOT NULL
fine_level integer NOT NULL
age_protect integer
circulate boolean NOT NULL
deposit boolean NOT NULL
ref boolean NOT NULL
holdable boolean NOT NULL
deposit_amount numeric(6,2) NOT NULL
price numeric(8,2) NOT NULL
barcode text NOT NULL
circ_modifier text
circ_as_type text
dummy_title text
dummy_author text
alert_message text
opac_visible boolean NOT NULL
deleted boolean NOT NULL

 

Permissions which apply to auditor.asset_copy_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.asset_copy_lifecycle

auditor.asset_copy_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id bigint
circ_lib integer
creator bigint
call_number bigint
editor bigint
create_date timestamp with time zone
edit_date timestamp with time zone
copy_number integer
status integer
location integer
loan_duration integer
fine_level integer
age_protect integer
circulate boolean
deposit boolean
ref boolean
holdable boolean
deposit_amount numeric
price numeric
barcode text
circ_modifier text
circ_as_type text
dummy_title text
dummy_author text
alert_message text
opac_visible boolean
deleted boolean
SELECT now
() AS audit_time
,'C' 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_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;

 

Permissions which apply to auditor.asset_copy_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Table: auditor.biblio_record_entry_history

auditor.biblio_record_entry_history Structure
F-Key Name Type Description
audit_time timestamp with time zone NOT NULL
audit_action text NOT NULL
id bigint NOT NULL
creator integer NOT NULL
editor integer NOT NULL
source integer
quality integer
create_date timestamp with time zone NOT NULL
edit_date timestamp with time zone NOT NULL
active boolean NOT NULL
deleted boolean NOT NULL
fingerprint text
tcn_source text NOT NULL
tcn_value text NOT NULL
marc text NOT NULL
last_xact_id text NOT NULL

 

Permissions which apply to auditor.biblio_record_entry_history
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


View: auditor.biblio_record_entry_lifecycle

auditor.biblio_record_entry_lifecycle Structure
F-Key Name Type Description
audit_time timestamp with time zone
audit_action text
id bigint
creator integer
editor integer
source integer
quality integer
create_date timestamp with time zone
edit_date timestamp with time zone
active boolean
deleted boolean
fingerprint text
tcn_source text
tcn_value text
marc text
last_xact_id text
SELECT now
() AS audit_time
,'C' 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_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;

 

Permissions which apply to auditor.biblio_record_entry_lifecycle
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema auditor


Function: auditor.audit_actor_org_unit_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.actor_org_unit_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.audit_actor_usr_address_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.actor_usr_address_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.audit_actor_usr_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.actor_usr_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.audit_asset_call_number_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.asset_call_number_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.audit_asset_copy_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.asset_copy_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.audit_biblio_record_entry_func( )

Returns: "trigger"

Language: PLPGSQL

			BEGIN
				INSERT INTO auditor.biblio_record_entry_history
					SELECT now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			

Function: auditor.create_auditor( sch text, tbl text )

Returns: boolean

Language: PLPGSQL

BEGIN
	EXECUTE $$
			CREATE TABLE auditor.$$ || sch || $$_$$ || tbl || $$_history (
				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 now(), SUBSTR(TG_OP,1,1), OLD.*;
				RETURN NULL;
			END;
			$func$ LANGUAGE 'plpgsql';
	$$;

	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	now() as audit_time, 'C' as audit_action, *
				  FROM	$$ || sch || $$.$$ || tbl || $$
				  	UNION ALL
				SELECT	*
				  FROM	auditor.$$ || sch || $$_$$ || tbl || $$_history;
	$$;
	RETURN TRUE;
END;

Schema authority


Table: authority.full_rec

authority.full_rec Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
record bigint NOT NULL
tag character(3) NOT NULL
ind1 text
ind2 text
subfield text
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to authority.full_rec
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema authority


Table: authority.rec_descriptor

authority.rec_descriptor Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
record bigint
record_status text
char_encoding text

 

Permissions which apply to authority.rec_descriptor
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema authority


Table: authority.record_entry

authority.record_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
arn_source text NOT NULL DEFAULT 'AUTOGEN'::text
arn_value text NOT NULL
creator integer NOT NULL DEFAULT 1
editor integer NOT NULL DEFAULT 1
create_date timestamp with time zone NOT NULL DEFAULT now()
edit_date timestamp with time zone NOT NULL DEFAULT now()
active boolean NOT NULL DEFAULT true
deleted boolean NOT NULL DEFAULT false
source integer
marc text NOT NULL
last_xact_id text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to authority.record_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema authority


Table: authority.record_note

authority.record_note Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
authority.record_entry.id record bigint NOT NULL
value text NOT NULL
creator integer NOT NULL DEFAULT 1
editor integer NOT NULL DEFAULT 1
create_date timestamp with time zone NOT NULL DEFAULT now()
edit_date timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to authority.record_note
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema authority


View: authority.tracing_links

authority.tracing_links Structure
F-Key Name Type Description
record bigint
main_id bigint
main_tag character(3)
main_value text
relationship text
use_restriction text
deprecation text
display_restriction text
link_id bigint
link_tag character(3)
link_value text
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 = 'w'::text)
                 )
           )
     )
  JOIN authority.full_rec link_value 
    ON (
           (
                 (
                       (link_value.record = main.record)
                     AND (link_value.tag = link.tag)
                 )
               AND (link_value.subfield = 'a'::text)
           )
     )
)
WHERE (
     (
           (
                 (
                       (
                             (
                                   (
                                         (
                                               (
                                                     (
                                                           (
                                                                 (main.tag = '100'::bpchar)
                                                                OR (main.tag = '110'::bpchar)
                                                           )
                                                          OR (main.tag = '111'::bpchar)
                                                     )
                                                    OR (main.tag = '130'::bpchar)
                                               )
                                              OR (main.tag = '150'::bpchar)
                                         )
                                        OR (main.tag = '151'::bpchar)
                                   )
                                  OR (main.tag = '155'::bpchar)
                             )
                            OR (main.tag = '180'::bpchar)
                       )
                      OR (main.tag = '181'::bpchar)
                 )
                OR (main.tag = '182'::bpchar)
           )
          OR (main.tag = '185'::bpchar)
     )
   AND (main.subfield = 'a'::text)
);

 

Permissions which apply to authority.tracing_links
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema authority


Schema biblio


Table: biblio.record_entry

biblio.record_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id creator integer NOT NULL DEFAULT 1
actor.usr.id editor integer NOT NULL DEFAULT 1
source integer
quality integer
create_date timestamp with time zone NOT NULL DEFAULT now()
edit_date timestamp with time zone NOT NULL DEFAULT now()
active boolean NOT NULL DEFAULT true
deleted boolean NOT NULL DEFAULT false
fingerprint text
tcn_source text NOT NULL DEFAULT 'AUTOGEN'::text
tcn_value text NOT NULL DEFAULT next_autogen_tcn_value()
marc text NOT NULL
last_xact_id text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to biblio.record_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema biblio


Table: biblio.record_note

biblio.record_note Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id record bigint NOT NULL
value text NOT NULL
actor.usr.id creator integer NOT NULL DEFAULT 1
actor.usr.id editor integer NOT NULL DEFAULT 1
pub boolean NOT NULL DEFAULT false
create_date timestamp with time zone NOT NULL DEFAULT now()
edit_date timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to biblio.record_note
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema biblio


Function: biblio.next_autogen_tcn_value( )

Returns: text

Language: PLPGSQL

    BEGIN RETURN 'AUTOGENERATED_' || nextval('biblio.autogen_tcn_value_seq'::TEXT); END;

Schema config

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander * * 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. */


Table: config.audience_map

config.audience_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL
description text

 

Permissions which apply to config.audience_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.bib_level_map

config.bib_level_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL

Index - Schema config


Table: config.bib_source

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * Valid sources of MARC records * * This is table is used to set up the relative "quality" 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. */

config.bib_source Structure
F-Key Name Type Description
id serial PRIMARY KEY
quality integer
source text UNIQUE NOT NULL
transcendant boolean NOT NULL DEFAULT false

 

config.bib_source Constraints
Name Constraint
bib_source_quality_check CHECK (((quality >= 0) AND (quality <= 100)))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.bib_source
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.circ_matrix_circ_mod_test

config.circ_matrix_circ_mod_test Structure
F-Key Name Type Description
id serial PRIMARY KEY
config.circ_matrix_matchpoint.id matchpoint integer NOT NULL
items_out integer NOT NULL
config.circ_modifier.code circ_mod text NOT NULL

Index - Schema config


Table: config.circ_matrix_matchpoint

config.circ_matrix_matchpoint Structure
F-Key Name Type Description
id serial PRIMARY KEY
active boolean NOT NULL DEFAULT true
actor.org_unit.id org_unit integer UNIQUE#1 NOT NULL
permission.grp_tree.id grp integer UNIQUE#1 NOT NULL
config.circ_modifier.code circ_modifier text UNIQUE#1
config.item_type_map.code marc_type text UNIQUE#1
config.item_form_map.code marc_form text UNIQUE#1
config.videorecording_format_map.code marc_vr_format text UNIQUE#1
ref_flag boolean UNIQUE#1
is_renewal boolean UNIQUE#1
usr_age_lower_bound interval UNIQUE#1
usr_age_upper_bound interval UNIQUE#1

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Table: config.circ_matrix_ruleset

config.circ_matrix_ruleset Structure
F-Key Name Type Description
config.circ_matrix_matchpoint.id matchpoint integer PRIMARY KEY
config.rule_circ_duration.id duration_rule integer NOT NULL
config.rule_recuring_fine.id recurring_fine_rule integer NOT NULL
config.rule_max_fine.id max_fine_rule integer NOT NULL

Index - Schema config


Table: config.circ_matrix_test

config.circ_matrix_test Structure
F-Key Name Type Description
config.circ_matrix_matchpoint.id matchpoint integer PRIMARY KEY
circulate boolean NOT NULL DEFAULT true
max_items_out integer
max_overdue integer
max_fines numeric(8,2)
org_depth integer
script_test text

Index - Schema config


Table: config.circ_modifier

config.circ_modifier Structure
F-Key Name Type Description
code text PRIMARY KEY
name text UNIQUE NOT NULL
description text NOT NULL
sip2_media_type text NOT NULL
magnetic_media boolean NOT NULL DEFAULT true

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Table: config.copy_status

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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 imediate 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's values or it's 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. */

config.copy_status Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
holdable boolean NOT NULL DEFAULT false
opac_visible boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.copy_status
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.hold_matrix_matchpoint

config.hold_matrix_matchpoint Structure
F-Key Name Type Description
id serial PRIMARY KEY
active boolean NOT NULL DEFAULT true
actor.org_unit.id user_home_ou integer UNIQUE#1
actor.org_unit.id request_ou integer UNIQUE#1
actor.org_unit.id pickup_ou integer UNIQUE#1
actor.org_unit.id item_owning_ou integer UNIQUE#1
actor.org_unit.id item_circ_ou integer UNIQUE#1
permission.grp_tree.id usr_grp integer UNIQUE#1
permission.grp_tree.id requestor_grp integer UNIQUE#1 NOT NULL
config.circ_modifier.code circ_modifier text UNIQUE#1
config.item_type_map.code marc_type text UNIQUE#1
config.item_form_map.code marc_form text UNIQUE#1
config.videorecording_format_map.code marc_vr_format text UNIQUE#1
ref_flag boolean

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Table: config.hold_matrix_test

config.hold_matrix_test Structure
F-Key Name Type Description
config.hold_matrix_matchpoint.id matchpoint integer PRIMARY KEY
holdable boolean NOT NULL DEFAULT true
distance_is_from_owner boolean NOT NULL DEFAULT false
actor.org_unit_type.id transit_range integer
max_holds integer
include_frozen_holds boolean NOT NULL DEFAULT true
stop_blocked_user boolean NOT NULL DEFAULT false
config.rule_age_hold_protect.id age_hold_protect_rule integer

Index - Schema config


Table: config.i18n_core

config.i18n_core Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
fq_field text NOT NULL
identity_value text NOT NULL
config.i18n_locale.code translation text NOT NULL
string text NOT NULL

Index - Schema config


Table: config.i18n_locale

config.i18n_locale Structure
F-Key Name Type Description
code text PRIMARY KEY
config.language_map.code marc_code text NOT NULL
name text UNIQUE NOT NULL
description text

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Table: config.identification_type

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

config.identification_type Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.identification_type
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.item_form_map

config.item_form_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.item_form_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.item_type_map

config.item_type_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.item_type_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.language_map

config.language_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.language_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.lit_form_map

config.lit_form_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL
description text

 

Permissions which apply to config.lit_form_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.metabib_field

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * XPath used for WoRMing * * This table contains the XPath used to chop up MODS into it's * indexable parts. Each XPath entry is named and assigned to * a "class" 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. */

config.metabib_field Structure
F-Key Name Type Description
id serial PRIMARY KEY
field_class text NOT NULL
name text NOT NULL
xpath text NOT NULL
weight integer NOT NULL DEFAULT 1
format text NOT NULL DEFAULT 'mods32'::text
search_field boolean NOT NULL DEFAULT true
facet_field boolean NOT NULL DEFAULT false

 

config.metabib_field Constraints
Name Constraint
metabib_field_field_class_check CHECK ((((((lower(field_class) = 'title'::text) OR (lower(field_class) = 'author'::text)) OR (lower(field_class) = 'subject'::text)) OR (lower(field_class) = 'keyword'::text)) OR (lower(field_class) = 'series'::text)))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.metabib_field
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.net_access_level

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

config.net_access_level Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.net_access_level
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.non_cataloged_type

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

config.non_cataloged_type Structure
F-Key Name Type Description
id serial PRIMARY KEY
owning_lib integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
circ_duration interval NOT NULL DEFAULT '14 days'::interval
in_house boolean NOT NULL DEFAULT false

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.non_cataloged_type
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.rule_age_hold_protect

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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 ('prox' column) is calculated by counting * the number of tree edges beween the user'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. */

config.rule_age_hold_protect Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
age interval NOT NULL
prox integer NOT NULL

 

config.rule_age_hold_protect Constraints
Name Constraint
rule_age_hold_protect_name_check CHECK ((name ~ E'^\\w+$'::text))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.rule_age_hold_protect
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.rule_circ_duration

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

config.rule_circ_duration Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
extended interval NOT NULL
normal interval NOT NULL
shrt interval NOT NULL
max_renewals integer NOT NULL

 

config.rule_circ_duration Constraints
Name Constraint
rule_circ_duration_name_check CHECK ((name ~ E'^\\w+$'::text))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.rule_circ_duration
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.rule_max_fine

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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. */

config.rule_max_fine Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
amount numeric(6,2) NOT NULL
is_percent boolean NOT NULL DEFAULT false

 

config.rule_max_fine Constraints
Name Constraint
rule_max_fine_name_check CHECK ((name ~ E'^\\w+$'::text))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.rule_max_fine
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.rule_recuring_fine

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * Circulation Recuring Fine rules * * Each circulation is given a recuring 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. */

config.rule_recuring_fine Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
high numeric(6,2) NOT NULL
normal numeric(6,2) NOT NULL
low numeric(6,2) NOT NULL
recurance_interval interval NOT NULL DEFAULT '1 day'::interval

 

config.rule_recuring_fine Constraints
Name Constraint
rule_recuring_fine_name_check CHECK ((name ~ E'^\\w+$'::text))

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to config.rule_recuring_fine
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.standing

/* * Copyright (C) 2005 Georgia Public Library Service * Mike Rylander <mrylander@gmail.com> * * 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 * that for translation, as the ID column is currently a "magic * number" 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. */

config.standing Structure
F-Key Name Type Description
id serial PRIMARY KEY
value text UNIQUE NOT NULL

 

Permissions which apply to config.standing
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema config


Table: config.upgrade_log

config.upgrade_log Structure
F-Key Name Type Description
version text PRIMARY KEY
install_date timestamp with time zone NOT NULL DEFAULT now()

Index - Schema config


Table: config.videorecording_format_map

config.videorecording_format_map Structure
F-Key Name Type Description
code text PRIMARY KEY
value text NOT NULL

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Table: config.xml_transform

config.xml_transform Structure
F-Key Name Type Description
name text PRIMARY KEY
namespace_uri text NOT NULL
prefix text NOT NULL
xslt text NOT NULL

Index - Schema config


Table: config.z3950_attr

config.z3950_attr Structure
F-Key Name Type Description
id serial PRIMARY KEY
config.z3950_source.name source text UNIQUE#1 NOT NULL
name text NOT NULL
label text NOT NULL
code integer UNIQUE#1 NOT NULL
format integer UNIQUE#1 NOT NULL
truncation integer NOT NULL

Index - Schema config


Table: config.z3950_source

config.z3950_source Structure
F-Key Name Type Description
name text PRIMARY KEY
label text UNIQUE NOT NULL
host text NOT NULL
port integer NOT NULL
db text NOT NULL
record_format text NOT NULL DEFAULT 'FI'::text
transmission_format text NOT NULL DEFAULT 'usmarc'::text
auth boolean NOT NULL DEFAULT true

Tables referencing this one via Foreign Key Constraints:

Index - Schema config


Schema container


Table: container.biblio_record_entry_bucket

container.biblio_record_entry_bucket Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id owner integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
btype text UNIQUE#1 NOT NULL DEFAULT 'misc'::text
pub boolean NOT NULL DEFAULT false
create_time timestamp with time zone NOT NULL DEFAULT now()

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to container.biblio_record_entry_bucket
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.biblio_record_entry_bucket_item

container.biblio_record_entry_bucket_item Structure
F-Key Name Type Description
id serial PRIMARY KEY
container.biblio_record_entry_bucket.id bucket integer NOT NULL
biblio.record_entry.id target_biblio_record_entry integer NOT NULL
create_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to container.biblio_record_entry_bucket_item
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.call_number_bucket

container.call_number_bucket Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id owner integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
btype text UNIQUE#1 NOT NULL DEFAULT 'misc'::text
pub boolean NOT NULL DEFAULT false
create_time timestamp with time zone NOT NULL DEFAULT now()

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to container.call_number_bucket
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.call_number_bucket_item

container.call_number_bucket_item Structure
F-Key Name Type Description
id serial PRIMARY KEY
container.call_number_bucket.id bucket integer NOT NULL
asset.call_number.id target_call_number integer NOT NULL
create_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to container.call_number_bucket_item
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.copy_bucket

container.copy_bucket Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id owner integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
btype text UNIQUE#1 NOT NULL DEFAULT 'misc'::text
pub boolean NOT NULL DEFAULT false
create_time timestamp with time zone NOT NULL DEFAULT now()

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to container.copy_bucket
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.copy_bucket_item

container.copy_bucket_item Structure
F-Key Name Type Description
id serial PRIMARY KEY
container.copy_bucket.id bucket integer NOT NULL
asset.copy.id target_copy integer NOT NULL
create_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to container.copy_bucket_item
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.user_bucket

container.user_bucket Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id owner integer UNIQUE#1 NOT NULL
name text UNIQUE#1 NOT NULL
btype text UNIQUE#1 NOT NULL DEFAULT 'misc'::text
pub boolean NOT NULL DEFAULT false
create_time timestamp with time zone NOT NULL DEFAULT now()

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to container.user_bucket
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Table: container.user_bucket_item

container.user_bucket_item Structure
F-Key Name Type Description
id serial PRIMARY KEY
container.user_bucket.id bucket integer NOT NULL
actor.usr.id target_user integer NOT NULL
create_time timestamp with time zone NOT NULL DEFAULT now()

 

Permissions which apply to container.user_bucket_item
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema container


Schema extend_reporter


View: extend_reporter.full_circ_count

extend_reporter.full_circ_count Structure
F-Key Name Type Description
id bigint
circ_count bigint
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;

Index - Schema extend_reporter


View: extend_reporter.global_bibs_by_holding_update

extend_reporter.global_bibs_by_holding_update Structure
F-Key Name Type Description
id bigint
holding_update timestamp with time zone
update_type text
SELECT DISTINCT 
ON (x.id) x.id
, x.holding_update
, x.update_type 
FROM (
SELECT b.id
     ,"last"
     (cp.create_date) AS holding_update
     ,'add' 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 > 0)
     )
GROUP BY b.id 
 UNIONSELECT b.id
     ,"last"
     (cp.edit_date) AS holding_update
     ,'delete' 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 > 0)
     )
GROUP BY b.id
) x 
ORDER BY x.id
, x.holding_update;

Index - Schema extend_reporter


Table: extend_reporter.legacy_circ_count

extend_reporter.legacy_circ_count Structure
F-Key Name Type Description
asset.copy.id id bigserial PRIMARY KEY
circ_count integer NOT NULL

Index - Schema extend_reporter


Schema metabib


Table: metabib.author_field_entry

metabib.author_field_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id source bigint NOT NULL
config.metabib_field.id field integer NOT NULL
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.author_field_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


View: metabib.full_rec

metabib.full_rec Structure
F-Key Name Type Description
id bigint
record bigint
tag character(3)
ind1 text
ind2 text
subfield text
value text
index_vector tsvector
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
,"substring"
(real_full_rec.value
     , 1
     , 1024
) AS value
, real_full_rec.index_vector 
FROM metabib.real_full_rec;

Index - Schema metabib


Table: metabib.keyword_field_entry

metabib.keyword_field_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id source bigint NOT NULL
config.metabib_field.id field integer NOT NULL
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.keyword_field_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.metarecord

metabib.metarecord Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
fingerprint text NOT NULL
biblio.record_entry.id master_record bigint
mods text

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to metabib.metarecord
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.metarecord_source_map

metabib.metarecord_source_map Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
metabib.metarecord.id metarecord bigint NOT NULL
biblio.record_entry.id source bigint NOT NULL

 

Permissions which apply to metabib.metarecord_source_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.real_full_rec

metabib.real_full_rec Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id record bigint NOT NULL
tag character(3) NOT NULL
ind1 text
ind2 text
subfield text
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.real_full_rec
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.rec_descriptor

metabib.rec_descriptor Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id record bigint
item_type text
item_form text
bib_level text
control_type text
char_encoding text
enc_level text
audience text
lit_form text
type_mat text
cat_form text
pub_status text
item_lang text
vr_format text
date1 text
date2 text

 

Permissions which apply to metabib.rec_descriptor
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.series_field_entry

metabib.series_field_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
source bigint NOT NULL
field integer NOT NULL
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.series_field_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.subject_field_entry

metabib.subject_field_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id source bigint NOT NULL
config.metabib_field.id field integer NOT NULL
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.subject_field_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Table: metabib.title_field_entry

metabib.title_field_entry Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
biblio.record_entry.id source bigint NOT NULL
config.metabib_field.id field integer NOT NULL
value text NOT NULL
index_vector tsvector NOT NULL

 

Permissions which apply to metabib.title_field_entry
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema metabib


Schema money


Table: money.billable_xact

money.billable_xact Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id usr integer NOT NULL
xact_start timestamp with time zone NOT NULL DEFAULT now()
xact_finish timestamp with time zone
unrecovered boolean

 

Permissions which apply to money.billable_xact
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.billable_xact_summary

money.billable_xact_summary Structure
F-Key Name Type Description
id bigint
usr integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
total_paid numeric
last_payment_ts timestamp with time zone
last_payment_note text
last_payment_type name
total_owed numeric
last_billing_ts timestamp with time zone
last_billing_note text
last_billing_type text
balance_owed numeric
xact_type name
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;

 

Permissions which apply to money.billable_xact_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.billable_xact_with_void_summary

money.billable_xact_with_void_summary Structure
F-Key Name Type Description
id bigint
usr integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
total_paid numeric
last_payment_ts timestamp with time zone
last_payment_note text
last_payment_type name
total_owed numeric
last_billing_ts timestamp with time zone
last_billing_note text
last_billing_type text
balance_owed numeric
xact_type name
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 
          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 
    GROUP BY payment_view.xact
     ) credit 
    ON (
           (xact.id = credit.xact)
     )
)
ORDER BY debit.billing_ts
, credit.payment_ts;

 

Permissions which apply to money.billable_xact_with_void_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.billing

money.billing Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
xact bigint NOT NULL
billing_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
voider integer
void_time timestamp with time zone
amount numeric(6,2) NOT NULL
billing_type text NOT NULL
note text

 

Permissions which apply to money.billing
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.bnm_desk_payment

money.bnm_desk_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL
actor.workstation.id cash_drawer integer

 

Permissions which apply to money.bnm_desk_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.bnm_payment

money.bnm_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL

 

Permissions which apply to money.bnm_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.bnm_payment_view

money.bnm_payment_view Structure
F-Key Name Type Description
id bigint
xact bigint
payment_ts timestamp with time zone
voided boolean
amount numeric(6,2)
note text
amount_collected numeric(6,2)
accepting_usr integer
payment_type name
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)
     )
);

 

Permissions which apply to money.bnm_payment_view
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.cash_payment

money.cash_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL
cash_drawer integer

 

Permissions which apply to money.cash_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.cashdrawer_payment_view

money.cashdrawer_payment_view Structure
F-Key Name Type Description
org_unit integer
cashdrawer integer
payment_type name
payment_ts timestamp with time zone
amount numeric(6,2)
voided boolean
note text
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)
     )
);

 

Permissions which apply to money.cashdrawer_payment_view
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.check_payment

money.check_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL
cash_drawer integer
check_number text NOT NULL

 

Permissions which apply to money.check_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.collections_tracker

money.collections_tracker Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
actor.usr.id usr integer NOT NULL
actor.usr.id collector integer NOT NULL
actor.org_unit.id location integer NOT NULL
enter_time timestamp with time zone

 

Permissions which apply to money.collections_tracker
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.credit_card_payment

money.credit_card_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL
cash_drawer integer
cc_type text
cc_number text
expire_month integer
expire_year integer
approval_code text

 

Permissions which apply to money.credit_card_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.credit_payment

money.credit_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL

 

Permissions which apply to money.credit_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.desk_payment_view

money.desk_payment_view Structure
F-Key Name Type Description
id bigint
xact bigint
payment_ts timestamp with time zone
voided boolean
amount numeric(6,2)
note text
amount_collected numeric(6,2)
accepting_usr integer
cash_drawer integer
payment_type name
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)
     )
);

 

Permissions which apply to money.desk_payment_view
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.forgive_payment

money.forgive_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL

 

Permissions which apply to money.forgive_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.goods_payment

money.goods_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('money.payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL

 

Permissions which apply to money.goods_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.grocery

money.grocery Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('billable_xact_id_seq'::regclass)
usr integer NOT NULL
xact_start timestamp with time zone NOT NULL DEFAULT now()
xact_finish timestamp with time zone
billing_location integer NOT NULL
note text
unrecovered boolean

 

Permissions which apply to money.grocery
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.live_billing_total

money.live_billing_total Structure
F-Key Name Type Description
xact bigint
amount numeric
last_billing_ts timestamp with time zone
last_note text
SELECT billing.xact
, sum
(billing.amount) AS amount
, max
(billing.billing_ts) AS last_billing_ts
,"last"
(billing.note) AS last_note 
FROM money.billing 
WHERE (billing.voided IS FALSE)
GROUP BY billing.xact;

 

Permissions which apply to money.live_billing_total
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.live_payment_total

money.live_payment_total Structure
F-Key Name Type Description
xact bigint
amount numeric
last_payment_ts timestamp with time zone
last_note text
SELECT payment.xact
, sum
(payment.amount) AS amount
, max
(payment.payment_ts) AS last_payment_ts
,"last"
(payment.note) AS last_note 
FROM money.payment 
WHERE (payment.voided IS FALSE)
GROUP BY payment.xact;

 

Permissions which apply to money.live_payment_total
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.non_drawer_payment_view

money.non_drawer_payment_view Structure
F-Key Name Type Description
id bigint
xact bigint
payment_ts timestamp with time zone
voided boolean
amount numeric(6,2)
note text
amount_collected numeric(6,2)
accepting_usr integer
payment_type name
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 <> 'cash_payment'::name)
         AND (c.relname <> 'check_payment'::name)
     )
   AND (c.relname <> 'credit_card_payment'::name)
);

 

Permissions which apply to money.non_drawer_payment_view
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_balance_by_circ_and_owning_lib

money.open_balance_by_circ_and_owning_lib Structure
F-Key Name Type Description
circ_lib integer
owning_lib integer
billing_types text
balance numeric
SELECT x.circ_lib
, x.owning_lib
, array_to_string
(array_accum
     (DISTINCT x.billing_type)
     ,', '::text
) AS billing_types
, (sum
     (x.billed) - sum
     (COALESCE
           (
                 (
                  SELECT sum
                       (payment.amount) AS paid 
                    FROM money.payment 
                   WHERE (
                             (NOT payment.voided)
                           AND (payment.xact = x.id)
                       )
                 )
                 , (0)::numeric
           )
     )
) AS balance 
FROM money.open_circ_balance_by_circ_and_owning_lib x 
GROUP BY x.circ_lib
, x.owning_lib;

Index - Schema money


View: money.open_balance_by_owning_lib

money.open_balance_by_owning_lib Structure
F-Key Name Type Description
owning_lib integer
billing_types text
balance numeric
SELECT x.owning_lib
, array_to_string
(array_accum
     (DISTINCT x.billing_type)
     ,', '::text
) AS billing_types
, (sum
     (x.billed) - sum
     (COALESCE
           (
                 (
                  SELECT sum
                       (payment.amount) AS paid 
                    FROM money.payment 
                   WHERE (
                             (NOT payment.voided)
                           AND (payment.xact = x.id)
                       )
                 )
                 , (0)::numeric
           )
     )
) AS balance 
FROM money.open_circ_balance_by_owning_lib x 
GROUP BY x.owning_lib;

Index - Schema money


View: money.open_balance_by_usr_home_and_owning_lib

money.open_balance_by_usr_home_and_owning_lib Structure
F-Key Name Type Description
home_ou integer
owning_lib integer
billing_types text
balance numeric
SELECT x.home_ou
, x.owning_lib
, array_to_string
(array_accum
     (DISTINCT x.billing_type)
     ,', '::text
) AS billing_types
, (sum
     (x.billed) - sum
     (COALESCE
           (
                 (
                  SELECT sum
                       (payment.amount) AS paid 
                    FROM money.payment 
                   WHERE (
                             (NOT payment.voided)
                           AND (payment.xact = x.id)
                       )
                 )
                 , (0)::numeric
           )
     )
) AS balance 
FROM money.open_circ_balance_by_usr_home_and_owning_lib x 
GROUP BY x.home_ou
, x.owning_lib;

Index - Schema money


View: money.open_billable_xact_summary

money.open_billable_xact_summary Structure
F-Key Name Type Description
id bigint
usr integer
billing_location integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
total_paid numeric
last_payment_ts timestamp with time zone
last_payment_note text
last_payment_type name
total_owed numeric
last_billing_ts timestamp with time zone
last_billing_note text
last_billing_type text
balance_owed numeric
xact_type name
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);

 

Permissions which apply to money.open_billable_xact_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_circ_balance

money.open_circ_balance Structure
F-Key Name Type Description
id bigint
billing_types text
balance numeric
SELECT x.id
, x.billing_types
, (x.billed - COALESCE
     (
           (
            SELECT sum
                 (payment.amount) AS paid 
              FROM money.payment 
             WHERE (
                       (NOT payment.voided)
                     AND (payment.xact = x.id)
                 )
           )
           , (0)::numeric
     )
) AS balance 
FROM (
SELECT circ.id
     , array_to_string
     (array_accum
           (DISTINCT bill.billing_type)
           ,', '::text
     ) AS billing_types
     , sum
     (bill.amount) AS billed 
  FROM ("action".circulation circ 
        JOIN money.billing bill 
          ON (
                 (circ.id = bill.xact)
           )
     )
 WHERE (
           (circ.xact_finish IS NULL)
         AND (NOT bill.voided)
     )
GROUP BY circ.id 
ORDER BY circ.id
     , array_to_string
     (array_accum
           (DISTINCT bill.billing_type)
           ,', '::text
     )
) x 
WHERE (
     (x.billed - COALESCE
           (
                 (
                  SELECT sum
                       (payment.amount) AS paid 
                    FROM money.payment 
                   WHERE (
                             (NOT payment.voided)
                           AND (payment.xact = x.id)
                       )
                 )
                 , (0)::numeric
           )
     ) > 
     (0)::numeric
);

Index - Schema money


View: money.open_circ_balance_by_circ_and_owning_lib

money.open_circ_balance_by_circ_and_owning_lib Structure
F-Key Name Type Description
id bigint
circ_lib integer
owning_lib integer
billing_type text
billed numeric
SELECT circ.id
, circ.circ_lib
, cn.owning_lib
, bill.billing_type
, sum
(bill.amount) AS billed 
FROM (
     (
           ("action".circulation circ 
              JOIN money.billing bill 
                ON (
                       (circ.id = bill.xact)
                 )
           )
        JOIN asset."copy" cp 
          ON (
                 (circ.target_copy = cp.id)
           )
     )
  JOIN asset.call_number cn 
    ON (
           (cn.id = cp.call_number)
     )
)
WHERE (
     (circ.xact_finish IS NULL)
   AND (NOT bill.voided)
)
GROUP BY circ.id
, circ.circ_lib
, cn.owning_lib
, bill.billing_type 
ORDER BY circ.id
, circ.circ_lib
, cn.owning_lib
, bill.billing_type;

Index - Schema money


View: money.open_circ_balance_by_owning_lib

money.open_circ_balance_by_owning_lib Structure
F-Key Name Type Description
id bigint
owning_lib integer
billing_type text
billed numeric
SELECT circ.id
, cn.owning_lib
, bill.billing_type
, sum
(bill.amount) AS billed 
FROM (
     (
           ("action".circulation circ 
              JOIN money.billing bill 
                ON (
                       (circ.id = bill.xact)
                 )
           )
        JOIN asset."copy" cp 
          ON (
                 (circ.target_copy = cp.id)
           )
     )
  JOIN asset.call_number cn 
    ON (
           (cn.id = cp.call_number)
     )
)
WHERE (
     (circ.xact_finish IS NULL)
   AND (NOT bill.voided)
)
GROUP BY circ.id
, cn.owning_lib
, bill.billing_type 
ORDER BY circ.id
, cn.owning_lib
, bill.billing_type;

Index - Schema money


View: money.open_circ_balance_by_usr_home_and_owning_lib

money.open_circ_balance_by_usr_home_and_owning_lib Structure
F-Key Name Type Description
id bigint
home_ou integer
owning_lib integer
billing_type text
billed numeric
SELECT circ.id
, usr.home_ou
, cn.owning_lib
, bill.billing_type
, sum
(bill.amount) AS billed 
FROM (
     (
           (
                 ("action".circulation circ 
                    JOIN money.billing bill 
                      ON (
                             (circ.id = bill.xact)
                       )
                 )
              JOIN asset."copy" cp 
                ON (
                       (circ.target_copy = cp.id)
                 )
           )
        JOIN asset.call_number cn 
          ON (
                 (cn.id = cp.call_number)
           )
     )
  JOIN actor.usr usr 
    ON (
           (circ.usr = usr.id)
     )
)
WHERE (
     (circ.xact_finish IS NULL)
   AND (NOT bill.voided)
)
GROUP BY circ.id
, usr.home_ou
, cn.owning_lib
, bill.billing_type 
ORDER BY circ.id
, usr.home_ou
, cn.owning_lib
, bill.billing_type;

Index - Schema money


View: money.open_transaction_billing_summary

money.open_transaction_billing_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
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);

 

Permissions which apply to money.open_transaction_billing_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_transaction_billing_type_summary

money.open_transaction_billing_type_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
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);

 

Permissions which apply to money.open_transaction_billing_type_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_transaction_payment_summary

money.open_transaction_payment_summary Structure
F-Key Name Type Description
xact bigint
last_payment_type name
last_payment_note text
last_payment_ts timestamp with time zone
total_paid numeric
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);

 

Permissions which apply to money.open_transaction_payment_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_transaction_type_class_location_summary

money.open_transaction_type_class_location_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
transactions_class name
location integer
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
SELECT billing.xact
, billing.billing_type AS last_billing_type
, p.relname AS transactions_class
, COALESCE
(g.billing_location
     , c.circ_lib
) AS "location"
,"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 
                    JOIN money.billable_xact x 
                      ON (
                             (x.id = billing.xact)
                       )
                 )
              JOIN pg_class p 
                ON (
                       (x.tableoid = p.oid)
                 )
           )
   LEFT JOIN money.grocery g 
          ON (
                 (g.id = x.id)
           )
     )
LEFT JOIN"action".circulation c 
    ON (
           (c.id = x.id)
     )
)
WHERE (billing.voided IS FALSE)
GROUP BY billing.xact
, billing.billing_type
, p.relname
, COALESCE
(g.billing_location
     , c.circ_lib
)
ORDER BY max
(billing.billing_ts);

Index - Schema money


View: money.open_transaction_type_class_summary

money.open_transaction_type_class_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
transactions_class name
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
SELECT billing.xact
, billing.billing_type AS last_billing_type
, p.relname AS transactions_class
,"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 
        JOIN money.billable_xact x 
          ON (
                 (x.id = billing.xact)
           )
     )
  JOIN pg_class p 
    ON (
           (x.tableoid = p.oid)
     )
)
WHERE (billing.voided IS FALSE)
GROUP BY billing.xact
, billing.billing_type
, p.relname 
ORDER BY max
(billing.billing_ts);

Index - Schema money


View: money.open_usr_circulation_summary

money.open_usr_circulation_summary Structure
F-Key Name Type Description
usr integer
total_paid numeric
total_owed numeric
balance_owed numeric
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 = 'circulation'::name)
GROUP BY open_billable_xact_summary.usr;

 

Permissions which apply to money.open_usr_circulation_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.open_usr_summary

money.open_usr_summary Structure
F-Key Name Type Description
usr integer
total_paid numeric
total_owed numeric
balance_owed numeric
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;

 

Permissions which apply to money.open_usr_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.payment

money.payment Structure
F-Key Name Type Description
id bigserial PRIMARY KEY
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text

 

Permissions which apply to money.payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.payment_view

money.payment_view Structure
F-Key Name Type Description
id bigint
xact bigint
payment_ts timestamp with time zone
voided boolean
amount numeric(6,2)
note text
payment_type name
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)
     )
);

 

Permissions which apply to money.payment_view
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.transaction_billing_summary

money.transaction_billing_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
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);

 

Permissions which apply to money.transaction_billing_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.transaction_billing_type_summary

money.transaction_billing_type_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
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);

 

Permissions which apply to money.transaction_billing_type_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.transaction_billing_with_void_summary

money.transaction_billing_with_void_summary Structure
F-Key Name Type Description
xact bigint
last_billing_type text
last_billing_note text
last_billing_ts timestamp with time zone
total_owed numeric
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);

 

Permissions which apply to money.transaction_billing_with_void_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.transaction_payment_summary

money.transaction_payment_summary Structure
F-Key Name Type Description
xact bigint
last_payment_type name
last_payment_note text
last_payment_ts timestamp with time zone
total_paid numeric
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);

 

Permissions which apply to money.transaction_payment_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.transaction_payment_with_void_summary

money.transaction_payment_with_void_summary Structure
F-Key Name Type Description
xact bigint
last_payment_type name
last_payment_note text
last_payment_ts timestamp with time zone
total_paid numeric
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);

 

Permissions which apply to money.transaction_payment_with_void_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.usr_circulation_summary

money.usr_circulation_summary Structure
F-Key Name Type Description
usr integer
total_paid numeric
total_owed numeric
balance_owed numeric
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 = 'circulation'::name)
GROUP BY billable_xact_summary.usr;

 

Permissions which apply to money.usr_circulation_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


View: money.usr_summary

money.usr_summary Structure
F-Key Name Type Description
usr integer
total_paid numeric
total_owed numeric
balance_owed numeric
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;

 

Permissions which apply to money.usr_summary
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Table: money.work_payment

money.work_payment Structure
F-Key Name Type Description
id bigint PRIMARY KEY DEFAULT nextval('payment_id_seq'::regclass)
xact bigint NOT NULL
payment_ts timestamp with time zone NOT NULL DEFAULT now()
voided boolean NOT NULL DEFAULT false
amount numeric(6,2) NOT NULL
note text
amount_collected numeric(6,2) NOT NULL
accepting_usr integer NOT NULL

 

Permissions which apply to money.work_payment
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema money


Schema offline


Table: offline.script

offline.script Structure
F-Key Name Type Description
id serial PRIMARY KEY
session text NOT NULL
requestor integer NOT NULL
create_time integer NOT NULL
workstation text NOT NULL
logfile text NOT NULL
time_delta integer NOT NULL
count integer NOT NULL

 

Permissions which apply to offline.script
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema offline


Table: offline.session

offline.session Structure
F-Key Name Type Description
key text PRIMARY KEY
org integer NOT NULL
description text
creator integer NOT NULL
create_time integer NOT NULL
in_process integer NOT NULL
start_time integer
end_time integer
num_complete integer NOT NULL

 

Permissions which apply to offline.session
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema offline


Schema permission


Table: permission.grp_perm_map

permission.grp_perm_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
permission.grp_tree.id grp integer UNIQUE#1 NOT NULL
permission.perm_list.id perm integer UNIQUE#1 NOT NULL
depth integer NOT NULL
grantable boolean NOT NULL DEFAULT false

 

Permissions which apply to permission.grp_perm_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema permission


Table: permission.grp_tree

permission.grp_tree Structure
F-Key Name Type Description
id serial PRIMARY KEY
name text UNIQUE NOT NULL
permission.grp_tree.id parent integer
usergroup boolean NOT NULL DEFAULT true
perm_interval interval NOT NULL DEFAULT '3 years'::interval
description text
application_perm text

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to permission.grp_tree
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema permission


Table: permission.perm_list

permission.perm_list Structure
F-Key Name Type Description
id serial PRIMARY KEY
code text UNIQUE NOT NULL
description text

Tables referencing this one via Foreign Key Constraints:

 

Permissions which apply to permission.perm_list
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema permission


Table: permission.usr_grp_map

permission.usr_grp_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer UNIQUE#1 NOT NULL
permission.grp_tree.id grp integer UNIQUE#1 NOT NULL

 

Permissions which apply to permission.usr_grp_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema permission


Table: permission.usr_object_perm_map

permission.usr_object_perm_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer UNIQUE#1 NOT NULL
permission.perm_list.id perm integer UNIQUE#1 NOT NULL
object_type text UNIQUE#1 NOT NULL
object_id text UNIQUE#1 NOT NULL
grantable boolean NOT NULL DEFAULT false

Index - Schema permission


Table: permission.usr_perm_map

permission.usr_perm_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer UNIQUE#1 NOT NULL
permission.perm_list.id perm integer UNIQUE#1 NOT NULL
depth integer NOT NULL
grantable boolean NOT NULL DEFAULT false

 

Permissions which apply to permission.usr_perm_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema permission


Table: permission.usr_work_ou_map

permission.usr_work_ou_map Structure
F-Key Name Type Description
id serial PRIMARY KEY
actor.usr.id usr integer UNIQUE#1 NOT NULL
actor.org_unit.id work_ou integer UNIQUE#1 NOT NULL

Index - Schema permission


Function: permission.grp_ancestors( integer )

Returns: SET OF grp_tree

Language: SQL

        SELECT  a.*
        FROM    connectby('permission.grp_tree'::text,'parent'::text,'id'::text,'name'::text,$1::text,100,'.'::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;

Function: permission.grp_combined_ancestors( integer, integer )

Returns: SET OF grp_tree

Language: SQL

    SELECT  *
      FROM  permission.grp_ancestors($1)
            UNION
    SELECT  *
      FROM  permission.grp_ancestors($2);

Function: permission.grp_common_ancestors( integer, integer )

Returns: SET OF grp_tree

Language: SQL

    SELECT  *
      FROM  permission.grp_ancestors($1)
            INTERSECT
    SELECT  *
      FROM  permission.grp_ancestors($2);

Function: permission.grp_descendants( integer )

Returns: SET OF grp_tree

Language: SQL

    SELECT  a.*
      FROM  connectby('permission.grp_tree'::text,'id'::text,'parent'::text,'name'::text,$1::text,100,'.'::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;

Function: permission.grp_full_path( integer )

Returns: SET OF grp_tree

Language: SQL

    SELECT  *
      FROM  permission.grp_ancestors($1)
            UNION
    SELECT  *
      FROM  permission.grp_descendants($1);

Function: permission.grp_proximity( integer, integer )

Returns: integer

Language: SQL

    SELECT COUNT(id)::INT FROM (
        SELECT id FROM permission.grp_combined_ancestors($1, $2)
            EXCEPT
        SELECT id FROM permission.grp_common_ancestors($1, $2)
    ) z;

Function: permission.usr_can_grant_perm( iuser integer, tperm text, target_ou integer )

Returns: boolean

Language: PLPGSQL

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;

Function: permission.usr_has_home_perm( iuser integer, tperm text, target_ou integer )

Returns: boolean

Language: PLPGSQL

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;

Function: permission.usr_has_object_perm( integer, text, text, text )

Returns: boolean

Language: SQL

    SELECT permission.usr_has_object_perm( $1, $2, $3, $4, -1 );

Function: permission.usr_has_object_perm( iuser integer, tperm text, obj_type text, obj_id text, target_ou integer )

Returns: boolean

Language: PLPGSQL

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 > -1 THEN
		RETURN permission.usr_has_perm( iuser, tperm, target_ou);
	END IF;

	RETURN FALSE;

END;

Function: permission.usr_has_perm( integer, text, integer )

Returns: boolean

Language: SQL

        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;

Function: permission.usr_has_work_perm( iuser integer, tperm text, target_ou integer )

Returns: boolean

Language: PLPGSQL

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;

Function: permission.usr_perms( integer )

Returns: SET OF usr_perm_map

Language: SQL

	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 ;

Schema public

Standard public schema


Table: public.blackshear_fps

public.blackshear_fps Structure
F-Key Name Type Description
id integer
item_form text
date1 text
record_type text
bib_lvl text
title text

Index - Schema public


Table: public.blackshear_pines_fps

public.blackshear_pines_fps Structure
F-Key Name Type Description
id bigint
item_form text
date1 text
record_type text
bib_lvl text
title text

Index - Schema public


Table: public.catoosa_id_list

public.catoosa_id_list Structure
F-Key Name Type Description
id bigint

Index - Schema public


Table: public.circ_07

public.circ_07 Structure
F-Key Name Type Description
month text
type text
count bigint

 

Permissions which apply to public.circ_07
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.cn_hold_fix

public.cn_hold_fix Structure
F-Key Name Type Description
id integer
target bigint
current_copy bigint
hold_type text
pickup_lib integer
selection_ou integer
selection_depth integer
request_time date
capture_time timestamp with time zone
request_lib integer
requestor integer
usr integer

 

Permissions which apply to public.cn_hold_fix
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.copy_cnt_fix

public.copy_cnt_fix Structure
F-Key Name Type Description
item_id text
item_key integer

 

Permissions which apply to public.copy_cnt_fix
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.copy_hold_fix

public.copy_hold_fix Structure
F-Key Name Type Description
id integer
target bigint
current_copy bigint
hold_type text
pickup_lib integer
selection_ou integer
selection_depth integer
request_time date
capture_time timestamp with time zone
request_lib integer
requestor integer
usr integer

 

Permissions which apply to public.copy_hold_fix
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.existing_record_fp

public.existing_record_fp Structure
F-Key Name Type Description
id bigint
item_form text
date1 text
item_type text
bib_level text
title text
author text
isbn text
issn text
lccn text
pages text
publisher text
pubyear text
edition text

 

Permissions which apply to public.existing_record_fp
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.fix_brad

public.fix_brad Structure
F-Key Name Type Description
lib text
amount text

 

Permissions which apply to public.fix_brad
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.fix_fixme

public.fix_fixme Structure
F-Key Name Type Description
id bigint
recuring_fine numeric(6,2)
max_fine numeric

 

Permissions which apply to public.fix_fixme
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


View: public.holds_per_user_by_tens

public.holds_per_user_by_tens Structure
F-Key Name Type Description
users bigint
tens_group text
SELECT count
(x.usr) AS users
, x.tens_group 
FROM (
SELECT hold_request.usr
     , (
           (
                 (
                       (
                             (
                                   (count
                                         (*) / 10
                                   ) * 10
                             ) + 1
                       )
                 )::text || ' - '::text
           ) || 
           (
                 (
                       (
                             (count
                                   (*) / 10
                             ) * 10
                       ) + 10
                 )
           )::text
     ) AS tens_group 
  FROM"action".hold_request 
 WHERE (
           (hold_request.cancel_time IS NULL)
         AND (hold_request.fulfillment_time IS NULL)
     )
GROUP BY hold_request.usr
) x 
GROUP BY x.tens_group 
ORDER BY character_length
(x.tens_group)
, x.tens_group;

 

Permissions which apply to public.holds_per_user_by_tens
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.joined_billing

public.joined_billing Structure
F-Key Name Type Description
id bigint
numeric numeric(8,2)

 

Permissions which apply to public.joined_billing
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.joined_legacy

public.joined_legacy Structure
F-Key Name Type Description
cat_1 text
creation_date date
cat_2 text
current_location text
item_id text
cat_key integer
call_key integer
item_key integer
price numeric(8,2)
item_type text
owning_library text
shadow boolean
item_comment text
last_import_date date
home_location text
call_num text

 

Permissions which apply to public.joined_legacy
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_baduser_map

public.legacy_baduser_map Structure
F-Key Name Type Description
barcode text
id integer
type text

 

Permissions which apply to public.legacy_baduser_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_bill_amount

public.legacy_bill_amount Structure
F-Key Name Type Description
barcode text
bill integer

 

Permissions which apply to public.legacy_bill_amount
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_callnum

public.legacy_callnum Structure
F-Key Name Type Description
call_num text
cat_key integer
call_key integer
shadow boolean

 

Permissions which apply to public.legacy_callnum
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_charge

public.legacy_charge Structure
F-Key Name Type Description
charge_date text
due_date text
renewal_date text
charge_key1 integer
charge_key2 integer
charge_key3 integer
charge_key4 integer
user_key integer
overdue boolean
library text
claim_return_date text

 

Permissions which apply to public.legacy_charge
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_copy_status_map

public.legacy_copy_status_map Structure
F-Key Name Type Description
id integer
name text

 

Permissions which apply to public.legacy_copy_status_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_email

public.legacy_email Structure
F-Key Name Type Description
user_key integer
email text

 

Permissions which apply to public.legacy_email
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_hold

public.legacy_hold Structure
F-Key Name Type Description
available text
status text
notified date
num_of_notices integer
cat_key integer
call_key integer
item_key integer
hold_key integer
user_key integer
hold_date date
hold_range text
pickup_lib text
placing_lib text
owning_lib text
inactive_date date
inactive_reason text
hold_level text

 

Permissions which apply to public.legacy_hold
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_item

public.legacy_item Structure
F-Key Name Type Description
cat_1 text
creation_date date
cat_2 text
current_location text
item_id text
cat_key integer
call_key integer
item_key integer
price numeric(8,2)
item_type text
owning_library text
shadow boolean
item_comment text
last_import_date date
home_location text

 

Permissions which apply to public.legacy_item
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_lib_change_circ

public.legacy_lib_change_circ Structure
F-Key Name Type Description
lib integer
item bigint

 

Permissions which apply to public.legacy_lib_change_circ
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_lib_max_fine

public.legacy_lib_max_fine Structure
F-Key Name Type Description
lib text
max_fine numeric(6,2)

 

Permissions which apply to public.legacy_lib_max_fine
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_non_real_user

public.legacy_non_real_user Structure
F-Key Name Type Description
profile text
lib text
barcode text

 

Permissions which apply to public.legacy_non_real_user
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_piece_count

public.legacy_piece_count Structure
F-Key Name Type Description
barcode text
cnt integer

 

Permissions which apply to public.legacy_piece_count
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_pre_cat

public.legacy_pre_cat Structure
F-Key Name Type Description
barcode text
lib text
title text
author text

 

Permissions which apply to public.legacy_pre_cat
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_proc_fees

public.legacy_proc_fees Structure
F-Key Name Type Description
lib text
amount text

 

Permissions which apply to public.legacy_proc_fees
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_recirc_lib

public.legacy_recirc_lib Structure
F-Key Name Type Description
barcode text
lib text

 

Permissions which apply to public.legacy_recirc_lib
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_renewal_count

public.legacy_renewal_count Structure
F-Key Name Type Description
barcode text
cnt integer

 

Permissions which apply to public.legacy_renewal_count
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_status_change_circ

public.legacy_status_change_circ Structure
F-Key Name Type Description
profile text
item bigint

 

Permissions which apply to public.legacy_status_change_circ
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_transit

public.legacy_transit Structure
F-Key Name Type Description
destination_lib text
owning_lib text
starting_lib text
transit_date timestamp with time zone
transit_reason text
cat_key integer
call_key integer
item_key integer
hold_key integer

 

Permissions which apply to public.legacy_transit
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.legacy_type_circ_map

public.legacy_type_circ_map Structure
F-Key Name Type Description
item_type text
recuring_fine numeric(6,2)
renewals integer

 

Permissions which apply to public.legacy_type_circ_map
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.non_match_rec_list

public.non_match_rec_list Structure
F-Key Name Type Description
pines_id bigint
th_id integer
item_form text
date1 text
item_type text
bib_level text
title text

 

Permissions which apply to public.non_match_rec_list
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.non_unique

public.non_unique Structure
F-Key Name Type Description
id bigint
creator integer
editor integer
source integer
quality integer
create_date timestamp with time zone
edit_date timestamp with time zone
active boolean
deleted boolean
fingerprint text
tcn_source text
tcn_value text
marc text
last_xact_id text

 

Permissions which apply to public.non_unique
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.note_temp_table

public.note_temp_table Structure
F-Key Name Type Description
id bigint
note text

 

Permissions which apply to public.note_temp_table
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pg_ts_cfg

public.pg_ts_cfg Structure
F-Key Name Type Description
ts_name text PRIMARY KEY
prs_name text NOT NULL
locale text

 

Permissions which apply to public.pg_ts_cfg
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pg_ts_cfgmap

public.pg_ts_cfgmap Structure
F-Key Name Type Description
ts_name text PRIMARY KEY
tok_alias text PRIMARY KEY
dict_name text[]

 

Permissions which apply to public.pg_ts_cfgmap
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pg_ts_dict

public.pg_ts_dict Structure
F-Key Name Type Description
dict_name text PRIMARY KEY
dict_init regprocedure
dict_initoption text
dict_lexize regprocedure NOT NULL
dict_comment text

 

Permissions which apply to public.pg_ts_dict
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pg_ts_parser

public.pg_ts_parser Structure
F-Key Name Type Description
prs_name text PRIMARY KEY
prs_start regprocedure NOT NULL
prs_nexttoken regprocedure NOT NULL
prs_end regprocedure NOT NULL
prs_headline regprocedure NOT NULL
prs_lextype regprocedure NOT NULL
prs_comment text

 

Permissions which apply to public.pg_ts_parser
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_260_pubdate

public.pines_260_pubdate Structure
F-Key Name Type Description
record bigint
date1 text

 

Permissions which apply to public.pines_260_pubdate
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_all_pubdate

public.pines_all_pubdate Structure
F-Key Name Type Description
record bigint
date1 text

 

Permissions which apply to public.pines_all_pubdate
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_both_pubdate

public.pines_both_pubdate Structure
F-Key Name Type Description
record bigint
date1 text

 

Permissions which apply to public.pines_both_pubdate
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_fp

public.pines_fp Structure
F-Key Name Type Description
id bigint
item_form text
item_type text
bib_level text
title text
secondary_a text
secondary_b text
secondary_c text
secondary_d text
secondary_e text
secondary_f text

 

Permissions which apply to public.pines_fp
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_pubdate

public.pines_pubdate Structure
F-Key Name Type Description
record bigint
date1 text

 

Permissions which apply to public.pines_pubdate
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.pines_title

public.pines_title Structure
F-Key Name Type Description
record bigint
title text

 

Permissions which apply to public.pines_title
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.prematurely_closed_xacs

public.prematurely_closed_xacs Structure
F-Key Name Type Description
id bigint
usr integer
xact_start timestamp with time zone
xact_finish timestamp with time zone
total_paid numeric
last_payment_ts timestamp with time zone
last_payment_note text
last_payment_type name
total_owed numeric
last_billing_ts timestamp with time zone
last_billing_note text
last_billing_type text
balance_owed numeric
xact_type name

Index - Schema public


Table: public.quitman_full_fingerprint_set

public.quitman_full_fingerprint_set Structure
F-Key Name Type Description
id bigint
item_form text
substring text
item_type text
bib_level text
title text

Index - Schema public


Table: public.rec_list

public.rec_list Structure
F-Key Name Type Description
pines_id bigint
th_id integer
item_form text
date1 text
item_type text
bib_level text
title text

 

Permissions which apply to public.rec_list
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.secondary_rec_list

public.secondary_rec_list Structure
F-Key Name Type Description
pines_id bigint
th_id integer
item_form text
date1 text
item_type text
bib_level text
title text

 

Permissions which apply to public.secondary_rec_list
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.secondary_rec_list2

public.secondary_rec_list2 Structure
F-Key Name Type Description
pines_id bigint
th_id integer
item_form text
date1 text
item_type text
bib_level text
title text

 

Permissions which apply to public.secondary_rec_list2
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


View: public.testview

public.testview Structure
F-Key Name Type Description
id bigint
metarecord bigint
fingerprint text
quality integer
tcn_source text
tcn_value text
title text
author text
publisher text
pubdate text
isbn text
issn text
series_title text
series_statement text
summary text
topic_subject text
geographic_subject text
genre text
name_subject text
corporate_subject text
external_uri text
SELECT r.id
, s.metarecord
, r.fingerprint
, r.quality
, r.tcn_source
, r.tcn_value
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '245'::bpchar)
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS title
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '100'::bpchar)
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS author
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '260'::bpchar)
               AND (full_rec.subfield = 'b'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS publisher
, (
SELECT"first"
     ("substring"
           (full_rec.value
                 , E'\\d+'::text
           )
     ) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '260'::bpchar)
               AND (full_rec.subfield = 'c'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS pubdate
, (
SELECT"first"
     ("substring"
           (full_rec.value
                 , E'^\\w+'::text
           )
     ) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (
                       (full_rec.tag = '020'::bpchar)
                      OR (full_rec.tag = '024'::bpchar)
                 )
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS isbn
, (
SELECT"first"
     ("substring"
           (full_rec.value
                 , E'^\\S+'::text
           )
     ) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '022'::bpchar)
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS issn
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (
                       (full_rec.tag = '830'::bpchar)
                      OR (full_rec.tag = '440'::bpchar)
                 )
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS series_title
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '490'::bpchar)
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS series_statement
, (
SELECT"first"
     (full_rec.value) AS title 
  FROM metabib.real_full_rec full_rec 
 WHERE (
           (
                 (full_rec.tag = '520'::bpchar)
               AND (full_rec.subfield = 'a'::text)
           )
         AND (full_rec.record = r.id)
     )
) AS summary
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT DISTINCT "replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '650'::bpchar)
                                 AND (full_rec.subfield = 'a'::text)
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       )
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS topic_subject
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT DISTINCT "replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '651'::bpchar)
                                 AND (full_rec.subfield = 'a'::text)
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       )
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS geographic_subject
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT DISTINCT "replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '655'::bpchar)
                                 AND (full_rec.subfield = 'a'::text)
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       )
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS genre
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT DISTINCT "replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '600'::bpchar)
                                 AND (full_rec.subfield = 'a'::text)
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       )
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS name_subject
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT DISTINCT "replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '610'::bpchar)
                                 AND (full_rec.subfield = 'a'::text)
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       )
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS corporate_subject
, (
     ('["'::text || array_to_string
           (ARRAY
                 (
                  SELECT"replace"
                       ("replace"
                             (full_rec.value
                                   ,'"'::text
                                   ,'"'::text
                             )
                             , E'\\'::text
                             , E'\\\\'::text
                       ) AS "replace"
                    FROM metabib.real_full_rec full_rec 
                   WHERE (
                             (
                                   (full_rec.tag = '856'::bpchar)
                                 AND (
                                         (
                                               (full_rec.subfield = '3'::text)
                                              OR (full_rec.subfield = 'y'::text)
                                         )
                                        OR (full_rec.subfield = 'u'::text)
                                   )
                             )
                           AND (full_rec.record = r.id)
                       )
                ORDER BY CASE WHEN 
                       (
                             (full_rec.subfield = '3'::text)
                            OR (full_rec.subfield = 'y'::text)
                       ) THEN 0 ELSE 1 END
                 )
                 ,'","'::text
           )
     ) || '"]'::text
) AS external_uri 
FROM (biblio.record_entry r 
  JOIN metabib.metarecord_source_map s 
    ON (
           (s.source = r.id)
     )
)
WHERE (r.deleted IS FALSE)
GROUP BY r.id
, s.metarecord
, r.fingerprint
, r.quality
, r.tcn_source
, r.tcn_value;

 

Permissions which apply to public.testview
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.th_fingerprint_round_7

public.th_fingerprint_round_7 Structure
F-Key Name Type Description
id integer
item_form text
date1 text
item_type text
bib_level text
title text

 

Permissions which apply to public.th_fingerprint_round_7
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.th_rank

public.th_rank Structure
F-Key Name Type Description
pines_id bigint
subtitle text
items bigint

 

Permissions which apply to public.th_rank
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Table: public.title_hold_fix

public.title_hold_fix Structure
F-Key Name Type Description
id integer
target integer
current_copy bigint
hold_type text
pickup_lib integer
selection_ou integer
selection_depth integer
request_time date
capture_time timestamp with time zone
request_lib integer
requestor integer
usr integer

 

Permissions which apply to public.title_hold_fix
User
Select
Insert
Update
Delete
Reference
Rule
Trigger
PUBLIC
postgres

Index - Schema public


Function: public._get_parser_from_curcfg( )

Returns: text

Language: SQL

 select prs_name from pg_ts_cfg where oid = show_curcfg() 

Function: public.agg_text( text )

Returns: text

Language: INTERNAL

aggregate_dummy

Function: public.agg_tsvector( public.tsvector )

Returns: tsvector

Language: INTERNAL

aggregate_dummy

Function: public.array_accum( anyelement )

Returns: anyarray

Language: INTERNAL

aggregate_dummy

Function: public.call_number_dewey( text )

Returns: text

Language: PLPERLU

        my $txt = shift;
        $txt =~ s/^\s+//o;
        $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//og;
        $txt =~ s/\s+$//o;
        if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
                return $1;
        } else {
                return (split /\s+/, $txt)[0];
        }

Function: public.call_number_dewey( text, integer )

Returns: text

Language: SQL

	SELECT SUBSTRING(call_number_dewey($1) FROM 1 FOR $2);

Function: public.concat( public.tsvector, public.tsvector )

Returns: tsvector

Language: C

concat

Function: public.connectby( text, text, text, text, integer )

Returns: SET OF record

Language: C

connectby_text

Function: public.connectby( text, text, text, text, integer, text )

Returns: SET OF record

Language: C

connectby_text

Function: public.connectby( text, text, text, text, text, integer )

Returns: SET OF record

Language: C

connectby_text_serial

Function: public.connectby( text, text, text, text, text, integer, text )

Returns: SET OF record

Language: C

connectby_text_serial

Function: public.crosstab( text )

Returns: SET OF record

Language: C

crosstab

Function: public.crosstab( text, integer )

Returns: SET OF record

Language: C

crosstab

Function: public.crosstab( text, text )

Returns: SET OF record

Language: C

crosstab_hash

Function: public.crosstab2( text )

Returns: SET OF tablefunc_crosstab_2

Language: C

crosstab

Function: public.crosstab3( text )

Returns: SET OF tablefunc_crosstab_3

Language: C

crosstab

Function: public.crosstab4( text )

Returns: SET OF tablefunc_crosstab_4

Language: C

crosstab

Function: public.dex_init( internal )

Returns: internal

Language: C

dex_init

Function: public.dex_lexize( internal, internal, integer )

Returns: internal

Language: C

dex_lexize

Function: public.entityize( text )

Returns: text

Language: PLPERLU

    use Unicode::Normalize;

    my $x = NFC(shift);
    $x =~ s/([\x{0080}-\x{fffd}])/sprintf('&#x%X;',ord($1))/sgoe;
    return $x;


Function: public.exectsq( public.tsvector, public.tsquery )

Returns: boolean

Language: C

boolean operation with text index

exectsq

Function: public.explode_array( anyarray )

Returns: SET OF anyelement

Language: SQL

    SELECT ($1)[s] FROM generate_series(1, array_upper($1, 1)) AS s;

Function: public.extract_marc_field( text, bigint, text )

Returns: text

Language: SQL

	SELECT public.extract_marc_field($1,$2,$3,'');

Function: public.extract_marc_field( text, bigint, text, text )

Returns: text

Language: SQL

    SELECT regexp_replace(array_to_string( array_accum( output ),' ' ),$4,'','g') FROM xpath_table('id', 'marc', $1, $3, 'id='||$2)x(id INT, output TEXT);

Function: public.first( anyelement )

Returns: anyelement

Language: INTERNAL

aggregate_dummy

Function: public.first5( text )

Returns: text

Language: SQL

        SELECT SUBSTRING( $1, 1, 5);

Function: public.first_agg( anyelement, anyelement )

Returns: anyelement

Language: SQL

	SELECT CASE WHEN $1 IS NULL THEN $2 ELSE $1 END;

Function: public.first_word( text )

Returns: text

Language: SQL

        SELECT SUBSTRING( $1 FROM $_$^\S+$_$);

Function: public.gbt_bit_compress( internal )

Returns: internal

Language: C

gbt_bit_compress

Function: public.gbt_bit_consistent( internal, "bit", smallint )

Returns: boolean

Language: C

gbt_bit_consistent

Function: public.gbt_bit_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_bit_penalty

Function: public.gbt_bit_picksplit( internal, internal )

Returns: internal

Language: C

gbt_bit_picksplit

Function: public.gbt_bit_same( internal, internal, internal )

Returns: internal

Language: C

gbt_bit_same

Function: public.gbt_bit_union( bytea, internal )

Returns: gbtreekey_var

Language: C

gbt_bit_union

Function: public.gbt_bpchar_compress( internal )

Returns: internal

Language: C

gbt_bpchar_compress

Function: public.gbt_bpchar_consistent( internal, bpchar, smallint )

Returns: boolean

Language: C

gbt_bpchar_consistent

Function: public.gbt_bytea_compress( internal )

Returns: internal

Language: C

gbt_bytea_compress

Function: public.gbt_bytea_consistent( internal, bytea, smallint )

Returns: boolean

Language: C

gbt_bytea_consistent

Function: public.gbt_bytea_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_bytea_penalty

Function: public.gbt_bytea_picksplit( internal, internal )

Returns: internal

Language: C

gbt_bytea_picksplit

Function: public.gbt_bytea_same( internal, internal, internal )

Returns: internal

Language: C

gbt_bytea_same

Function: public.gbt_bytea_union( bytea, internal )

Returns: gbtreekey_var

Language: C

gbt_bytea_union

Function: public.gbt_cash_compress( internal )

Returns: internal

Language: C

gbt_cash_compress

Function: public.gbt_cash_consistent( internal, money, smallint )

Returns: boolean

Language: C

gbt_cash_consistent

Function: public.gbt_cash_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_cash_penalty

Function: public.gbt_cash_picksplit( internal, internal )

Returns: internal

Language: C

gbt_cash_picksplit

Function: public.gbt_cash_same( internal, internal, internal )

Returns: internal

Language: C

gbt_cash_same

Function: public.gbt_cash_union( bytea, internal )

Returns: gbtreekey8

Language: C

gbt_cash_union

Function: public.gbt_cidr_compress( internal )

Returns: internal

Language: C

gbt_cidr_compress

Function: public.gbt_cidr_consistent( internal, cidr, smallint )

Returns: boolean

Language: C

gbt_cidr_consistent

Function: public.gbt_date_compress( internal )

Returns: internal

Language: C

gbt_date_compress

Function: public.gbt_date_consistent( internal, date, smallint )

Returns: boolean

Language: C

gbt_date_consistent

Function: public.gbt_date_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_date_penalty

Function: public.gbt_date_picksplit( internal, internal )

Returns: internal

Language: C

gbt_date_picksplit

Function: public.gbt_date_same( internal, internal, internal )

Returns: internal

Language: C

gbt_date_same

Function: public.gbt_date_union( bytea, internal )

Returns: gbtreekey8

Language: C

gbt_date_union

Function: public.gbt_decompress( internal )

Returns: internal

Language: C

gbt_decompress

Function: public.gbt_float4_compress( internal )

Returns: internal

Language: C

gbt_float4_compress

Function: public.gbt_float4_consistent( internal, real, smallint )

Returns: boolean

Language: C

gbt_float4_consistent

Function: public.gbt_float4_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_float4_penalty

Function: public.gbt_float4_picksplit( internal, internal )

Returns: internal

Language: C

gbt_float4_picksplit

Function: public.gbt_float4_same( internal, internal, internal )

Returns: internal

Language: C

gbt_float4_same

Function: public.gbt_float4_union( bytea, internal )

Returns: gbtreekey8

Language: C

gbt_float4_union

Function: public.gbt_float8_compress( internal )

Returns: internal

Language: C

gbt_float8_compress

Function: public.gbt_float8_consistent( internal, double precision, smallint )

Returns: boolean

Language: C

gbt_float8_consistent

Function: public.gbt_float8_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_float8_penalty

Function: public.gbt_float8_picksplit( internal, internal )

Returns: internal

Language: C

gbt_float8_picksplit

Function: public.gbt_float8_same( internal, internal, internal )

Returns: internal

Language: C

gbt_float8_same

Function: public.gbt_float8_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_float8_union

Function: public.gbt_inet_compress( internal )

Returns: internal

Language: C

gbt_inet_compress

Function: public.gbt_inet_consistent( internal, inet, smallint )

Returns: boolean

Language: C

gbt_inet_consistent

Function: public.gbt_inet_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_inet_penalty

Function: public.gbt_inet_picksplit( internal, internal )

Returns: internal

Language: C

gbt_inet_picksplit

Function: public.gbt_inet_same( internal, internal, internal )

Returns: internal

Language: C

gbt_inet_same

Function: public.gbt_inet_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_inet_union

Function: public.gbt_int2_compress( internal )

Returns: internal

Language: C

gbt_int2_compress

Function: public.gbt_int2_consistent( internal, smallint, smallint )

Returns: boolean

Language: C

gbt_int2_consistent

Function: public.gbt_int2_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_int2_penalty

Function: public.gbt_int2_picksplit( internal, internal )

Returns: internal

Language: C

gbt_int2_picksplit

Function: public.gbt_int2_same( internal, internal, internal )

Returns: internal

Language: C

gbt_int2_same

Function: public.gbt_int2_union( bytea, internal )

Returns: gbtreekey4

Language: C

gbt_int2_union

Function: public.gbt_int4_compress( internal )

Returns: internal

Language: C

gbt_int4_compress

Function: public.gbt_int4_consistent( internal, integer, smallint )

Returns: boolean

Language: C

gbt_int4_consistent

Function: public.gbt_int4_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_int4_penalty

Function: public.gbt_int4_picksplit( internal, internal )

Returns: internal

Language: C

gbt_int4_picksplit

Function: public.gbt_int4_same( internal, internal, internal )

Returns: internal

Language: C

gbt_int4_same

Function: public.gbt_int4_union( bytea, internal )

Returns: gbtreekey8

Language: C

gbt_int4_union

Function: public.gbt_int8_compress( internal )

Returns: internal

Language: C

gbt_int8_compress

Function: public.gbt_int8_consistent( internal, bigint, smallint )

Returns: boolean

Language: C

gbt_int8_consistent

Function: public.gbt_int8_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_int8_penalty

Function: public.gbt_int8_picksplit( internal, internal )

Returns: internal

Language: C

gbt_int8_picksplit

Function: public.gbt_int8_same( internal, internal, internal )

Returns: internal

Language: C

gbt_int8_same

Function: public.gbt_int8_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_int8_union

Function: public.gbt_intv_compress( internal )

Returns: internal

Language: C

gbt_intv_compress

Function: public.gbt_intv_consistent( internal, interval, smallint )

Returns: boolean

Language: C

gbt_intv_consistent

Function: public.gbt_intv_decompress( internal )

Returns: internal

Language: C

gbt_intv_decompress

Function: public.gbt_intv_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_intv_penalty

Function: public.gbt_intv_picksplit( internal, internal )

Returns: internal

Language: C

gbt_intv_picksplit

Function: public.gbt_intv_same( internal, internal, internal )

Returns: internal

Language: C

gbt_intv_same

Function: public.gbt_intv_union( bytea, internal )

Returns: gbtreekey32

Language: C

gbt_intv_union

Function: public.gbt_macad_compress( internal )

Returns: internal

Language: C

gbt_macad_compress

Function: public.gbt_macad_consistent( internal, macaddr, smallint )

Returns: boolean

Language: C

gbt_macad_consistent

Function: public.gbt_macad_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_macad_penalty

Function: public.gbt_macad_picksplit( internal, internal )

Returns: internal

Language: C

gbt_macad_picksplit

Function: public.gbt_macad_same( internal, internal, internal )

Returns: internal

Language: C

gbt_macad_same

Function: public.gbt_macad_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_macad_union

Function: public.gbt_numeric_compress( internal )

Returns: internal

Language: C

gbt_numeric_compress

Function: public.gbt_numeric_consistent( internal, numeric, smallint )

Returns: boolean

Language: C

gbt_numeric_consistent

Function: public.gbt_numeric_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_numeric_penalty

Function: public.gbt_numeric_picksplit( internal, internal )

Returns: internal

Language: C

gbt_numeric_picksplit

Function: public.gbt_numeric_same( internal, internal, internal )

Returns: internal

Language: C

gbt_numeric_same

Function: public.gbt_numeric_union( bytea, internal )

Returns: gbtreekey_var

Language: C

gbt_numeric_union

Function: public.gbt_oid_compress( internal )

Returns: internal

Language: C

gbt_oid_compress

Function: public.gbt_oid_consistent( internal, oid, smallint )

Returns: boolean

Language: C

gbt_oid_consistent

Function: public.gbt_oid_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_oid_penalty

Function: public.gbt_oid_picksplit( internal, internal )

Returns: internal

Language: C

gbt_oid_picksplit

Function: public.gbt_oid_same( internal, internal, internal )

Returns: internal

Language: C

gbt_oid_same

Function: public.gbt_oid_union( bytea, internal )

Returns: gbtreekey8

Language: C

gbt_oid_union

Function: public.gbt_text_compress( internal )

Returns: internal

Language: C

gbt_text_compress

Function: public.gbt_text_consistent( internal, text, smallint )

Returns: boolean

Language: C

gbt_text_consistent

Function: public.gbt_text_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_text_penalty

Function: public.gbt_text_picksplit( internal, internal )

Returns: internal

Language: C

gbt_text_picksplit

Function: public.gbt_text_same( internal, internal, internal )

Returns: internal

Language: C

gbt_text_same

Function: public.gbt_text_union( bytea, internal )

Returns: gbtreekey_var

Language: C

gbt_text_union

Function: public.gbt_time_compress( internal )

Returns: internal

Language: C

gbt_time_compress

Function: public.gbt_time_consistent( internal, time without time zone, smallint )

Returns: boolean

Language: C

gbt_time_consistent

Function: public.gbt_time_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_time_penalty

Function: public.gbt_time_picksplit( internal, internal )

Returns: internal

Language: C

gbt_time_picksplit

Function: public.gbt_time_same( internal, internal, internal )

Returns: internal

Language: C

gbt_time_same

Function: public.gbt_time_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_time_union

Function: public.gbt_timetz_compress( internal )

Returns: internal

Language: C

gbt_timetz_compress

Function: public.gbt_timetz_consistent( internal, time with time zone, smallint )

Returns: boolean

Language: C

gbt_timetz_consistent

Function: public.gbt_ts_compress( internal )

Returns: internal

Language: C

gbt_ts_compress

Function: public.gbt_ts_consistent( internal, timestamp without time zone, smallint )

Returns: boolean

Language: C

gbt_ts_consistent

Function: public.gbt_ts_penalty( internal, internal, internal )

Returns: internal

Language: C

gbt_ts_penalty

Function: public.gbt_ts_picksplit( internal, internal )

Returns: internal

Language: C

gbt_ts_picksplit

Function: public.gbt_ts_same( internal, internal, internal )

Returns: internal

Language: C

gbt_ts_same

Function: public.gbt_ts_union( bytea, internal )

Returns: gbtreekey16

Language: C

gbt_ts_union

Function: public.gbt_tstz_compress( internal )

Returns: internal

Language: C

gbt_tstz_compress

Function: public.gbt_tstz_consistent( internal, timestamp with time zone, smallint )

Returns: boolean

Language: C

gbt_tstz_consistent

Function: public.gbt_var_decompress( internal )

Returns: internal

Language: C

gbt_var_decompress

Function: public.gbtreekey16_in( cstring )

Returns: gbtreekey16

Language: C

gbtreekey_in

Function: public.gbtreekey16_out( public.gbtreekey16 )

Returns: cstring

Language: C

gbtreekey_out

Function: public.gbtreekey32_in( cstring )

Returns: gbtreekey32

Language: C

gbtreekey_in

Function: public.gbtreekey32_out( public.gbtreekey32 )

Returns: cstring

Language: C

gbtreekey_out

Function: public.gbtreekey4_in( cstring )

Returns: gbtreekey4

Language: C

gbtreekey_in

Function: public.gbtreekey4_out( public.gbtreekey4 )

Returns: cstring

Language: C

gbtreekey_out

Function: public.gbtreekey8_in( cstring )

Returns: gbtreekey8

Language: C

gbtreekey_in

Function: public.gbtreekey8_out( public.gbtreekey8 )

Returns: cstring

Language: C

gbtreekey_out

Function: public.gbtreekey_var_in( cstring )

Returns: gbtreekey_var

Language: C

gbtreekey_in

Function: public.gbtreekey_var_out( public.gbtreekey_var )

Returns: cstring

Language: C

gbtreekey_out

Function: public.get_covers( public.tsvector, public.tsquery )

Returns: text

Language: C

get_covers

Function: public.gtrgm_compress( internal )

Returns: internal

Language: C

gtrgm_compress

Function: public.gtrgm_consistent( public.gtrgm, internal, integer )

Returns: boolean

Language: C

gtrgm_consistent

Function: public.gtrgm_decompress( internal )

Returns: internal

Language: C

gtrgm_decompress

Function: public.gtrgm_in( cstring )

Returns: gtrgm

Language: C

gtrgm_in

Function: public.gtrgm_out( public.gtrgm )

Returns: cstring

Language: C

gtrgm_out

Function: public.gtrgm_penalty( internal, internal, internal )

Returns: internal</