Dumped on 2007-04-04
- action
- actor
- asset
- auditor
- authority
- biblio
- config
- container
- metabib
- money
- offline
- permission
- public
- copynotes
- item_list
- pg_ts_cfg
- pg_ts_cfgmap
- pg_ts_dict
- pg_ts_parser
- _get_parser_from_curcfg( )
- agg_text( text )
- agg_tsvector( public.tsvector )
- array_accum( anyelement )
- biblio_field_table( record bigint, field integer )
- biblio_field_table( record bigint, field_list integer[] )
- call_number_dewey( text )
- call_number_dewey( text, integer )
- concat( public.tsvector, public.tsvector )
- connectby( text, text, text, text, integer )
- connectby( text, text, text, text, integer, text )
- connectby( text, text, text, text, text, integer )
- connectby( text, text, text, text, text, integer, text )
- crosstab( text )
- crosstab( text, integer )
- crosstab( text, text )
- crosstab2( text )
- crosstab3( text )
- crosstab4( text )
- dex_init( internal )
- dex_lexize( internal, internal, integer )
- exectsq( public.tsvector, public.tsquery )
- first( anyelement )
- first_agg( anyelement, anyelement )
- gbt_bit_compress( internal )
- gbt_bit_consistent( internal, "bit", smallint )
- gbt_bit_penalty( internal, internal, internal )
- gbt_bit_picksplit( internal, internal )
- gbt_bit_same( internal, internal, internal )
- gbt_bit_union( bytea, internal )
- gbt_bpchar_compress( internal )
- gbt_bpchar_consistent( internal, bpchar, smallint )
- gbt_bytea_compress( internal )
- gbt_bytea_consistent( internal, bytea, smallint )
- gbt_bytea_penalty( internal, internal, internal )
- gbt_bytea_picksplit( internal, internal )
- gbt_bytea_same( internal, internal, internal )
- gbt_bytea_union( bytea, internal )
- gbt_cash_compress( internal )
- gbt_cash_consistent( internal, money, smallint )
- gbt_cash_penalty( internal, internal, internal )
- gbt_cash_picksplit( internal, internal )
- gbt_cash_same( internal, internal, internal )
- gbt_cash_union( bytea, internal )
- gbt_date_compress( internal )
- gbt_date_consistent( internal, date, smallint )
- gbt_date_penalty( internal, internal, internal )
- gbt_date_picksplit( internal, internal )
- gbt_date_same( internal, internal, internal )
- gbt_date_union( bytea, internal )
- gbt_decompress( internal )
- gbt_float4_compress( internal )
- gbt_float4_consistent( internal, real, smallint )
- gbt_float4_penalty( internal, internal, internal )
- gbt_float4_picksplit( internal, internal )
- gbt_float4_same( internal, internal, internal )
- gbt_float4_union( bytea, internal )
- gbt_float8_compress( internal )
- gbt_float8_consistent( internal, double precision, smallint )
- gbt_float8_penalty( internal, internal, internal )
- gbt_float8_picksplit( internal, internal )
- gbt_float8_same( internal, internal, internal )
- gbt_float8_union( bytea, internal )
- gbt_inet_compress( internal )
- gbt_inet_consistent( internal, inet, smallint )
- gbt_inet_penalty( internal, internal, internal )
- gbt_inet_picksplit( internal, internal )
- gbt_inet_same( internal, internal, internal )
- gbt_inet_union( bytea, internal )
- gbt_int2_compress( internal )
- gbt_int2_consistent( internal, smallint, smallint )
- gbt_int2_penalty( internal, internal, internal )
- gbt_int2_picksplit( internal, internal )
- gbt_int2_same( internal, internal, internal )
- gbt_int2_union( bytea, internal )
- gbt_int4_compress( internal )
- gbt_int4_consistent( internal, integer, smallint )
- gbt_int4_penalty( internal, internal, internal )
- gbt_int4_picksplit( internal, internal )
- gbt_int4_same( internal, internal, internal )
- gbt_int4_union( bytea, internal )
- gbt_int8_compress( internal )
- gbt_int8_consistent( internal, bigint, smallint )
- gbt_int8_penalty( internal, internal, internal )
- gbt_int8_picksplit( internal, internal )
- gbt_int8_same( internal, internal, internal )
- gbt_int8_union( bytea, internal )
- gbt_intv_compress( internal )
- gbt_intv_consistent( internal, interval, smallint )
- gbt_intv_decompress( internal )
- gbt_intv_penalty( internal, internal, internal )
- gbt_intv_picksplit( internal, internal )
- gbt_intv_same( internal, internal, internal )
- gbt_intv_union( bytea, internal )
- gbt_macad_compress( internal )
- gbt_macad_consistent( internal, macaddr, smallint )
- gbt_macad_penalty( internal, internal, internal )
- gbt_macad_picksplit( internal, internal )
- gbt_macad_same( internal, internal, internal )
- gbt_macad_union( bytea, internal )
- gbt_numeric_compress( internal )
- gbt_numeric_consistent( internal, numeric, smallint )
- gbt_numeric_penalty( internal, internal, internal )
- gbt_numeric_picksplit( internal, internal )
- gbt_numeric_same( internal, internal, internal )
- gbt_numeric_union( bytea, internal )
- gbt_oid_compress( internal )
- gbt_oid_consistent( internal, oid, smallint )
- gbt_oid_penalty( internal, internal, internal )
- gbt_oid_picksplit( internal, internal )
- gbt_oid_same( internal, internal, internal )
- gbt_oid_union( bytea, internal )
- gbt_text_compress( internal )
- gbt_text_consistent( internal, text, smallint )
- gbt_text_penalty( internal, internal, internal )
- gbt_text_picksplit( internal, internal )
- gbt_text_same( internal, internal, internal )
- gbt_text_union( bytea, internal )
- gbt_time_compress( internal )
- gbt_time_consistent( internal, time without time zone, smallint )
- gbt_time_penalty( internal, internal, internal )
- gbt_time_picksplit( internal, internal )
- gbt_time_same( internal, internal, internal )
- gbt_time_union( bytea, internal )
- gbt_timetz_compress( internal )
- gbt_timetz_consistent( internal, time with time zone, smallint )
- gbt_ts_compress( internal )
- gbt_ts_consistent( internal, timestamp without time zone, smallint )
- gbt_ts_penalty( internal, internal, internal )
- gbt_ts_picksplit( internal, internal )
- gbt_ts_same( internal, internal, internal )
- gbt_ts_union( bytea, internal )
- gbt_tstz_compress( internal )
- gbt_tstz_consistent( internal, timestamp with time zone, smallint )
- gbt_var_decompress( internal )
- gbtreekey16_in( cstring )
- gbtreekey16_out( public.gbtreekey16 )
- gbtreekey32_in( cstring )
- gbtreekey32_out( public.gbtreekey32 )
- gbtreekey4_in( cstring )
- gbtreekey4_out( public.gbtreekey4 )
- gbtreekey8_in( cstring )
- gbtreekey8_out( public.gbtreekey8 )
- gbtreekey_var_in( cstring )
- gbtreekey_var_out( public.gbtreekey_var )
- get_covers( public.tsvector, public.tsquery )
- gin_extract_tsquery( public.tsquery, internal, internal )
- gin_extract_tsvector( public.tsvector, internal )
- gin_ts_consistent( internal, internal, public.tsquery )
- gtsq_compress( internal )
- gtsq_consistent( public.gtsq, internal, integer )
- gtsq_decompress( internal )
- gtsq_in( cstring )
- gtsq_out( public.gtsq )
- gtsq_penalty( internal, internal, internal )
- gtsq_picksplit( internal, internal )
- gtsq_same( public.gtsq, public.gtsq, internal )
- gtsq_union( bytea, internal )
- gtsvector_compress( internal )
- gtsvector_consistent( public.gtsvector, internal, integer )
- gtsvector_decompress( internal )
- gtsvector_in( cstring )
- gtsvector_out( public.gtsvector )
- gtsvector_penalty( internal, internal, internal )
- gtsvector_picksplit( internal, internal )
- gtsvector_same( public.gtsvector, public.gtsvector, internal )
- gtsvector_union( internal, internal )
- headline( oid, text, public.tsquery )
- headline( oid, text, public.tsquery, text )
- headline( text, public.tsquery )
- headline( text, public.tsquery, text )
- headline( text, text, public.tsquery )
- headline( text, text, public.tsquery, text )
- last( anyelement )
- last_agg( anyelement, anyelement )
- length( public.tsvector )
- lexize( oid, text )
- lexize( text )
- lexize( text, text )
- normal_rand( integer, double precision, double precision )
- numnode( public.tsquery )
- oils_tsearch2( )
- oils_xml_transform( text, text )
- parse( oid, text )
- parse( text )
- parse( text, text )
- plainto_tsquery( oid, text )
- plainto_tsquery( text )
- plainto_tsquery( text, text )
- prsd_end( internal )
- prsd_getlexeme( internal, internal, internal )
- prsd_headline( internal, internal, internal )
- prsd_lextype( internal )
- prsd_start( internal, integer )
- querytree( public.tsquery )
- rank( public.tsvector, public.tsquery )
- rank( public.tsvector, public.tsquery, integer )
- rank( real[], public.tsvector, public.tsquery )
- rank( real[], public.tsvector, public.tsquery, integer )
- rank_cd( public.tsvector, public.tsquery )
- rank_cd( public.tsvector, public.tsquery, integer )
- rank_cd( real[], public.tsvector, public.tsquery )
- rank_cd( real[], public.tsvector, public.tsquery, integer )
- reset_tsearch( )
- rewrite( public.tsquery, public.tsquery, public.tsquery )
- rewrite( public.tsquery, text )
- rewrite( public.tsquery[] )
- rewrite_accum( public.tsquery, public.tsquery[] )
- rewrite_finish( public.tsquery )
- rexectsq( public.tsquery, public.tsvector )
- set_curcfg( integer )
- set_curcfg( text )
- set_curdict( integer )
- set_curdict( text )
- set_curprs( integer )
- set_curprs( text )
- setweight( public.tsvector, "char" )
- show_curcfg( )
- snb_en_init( internal )
- snb_lexize( internal, internal, integer )
- snb_ru_init_koi8( internal )
- snb_ru_init_utf8( internal )
- spell_init( internal )
- spell_lexize( internal, internal, integer )
- stat( text )
- stat( text, text )
- strip( public.tsvector )
- syn_init( internal )
- syn_lexize( internal, internal, integer )
- tableoid2name( oid )
- text_concat( text, text )
- thesaurus_init( internal )
- thesaurus_lexize( internal, internal, integer, internal )
- to_tsquery( oid, text )
- to_tsquery( text )
- to_tsquery( text, text )
- to_tsvector( oid, text )
- to_tsvector( text )
- to_tsvector( text, text )
- token_type( )
- token_type( integer )
- token_type( text )
- ts_debug( text )
- tsearch2( )
- tsq_mcontained( public.tsquery, public.tsquery )
- tsq_mcontains( public.tsquery, public.tsquery )
- tsquery_and( public.tsquery, public.tsquery )
- tsquery_cmp( public.tsquery, public.tsquery )
- tsquery_eq( public.tsquery, public.tsquery )
- tsquery_ge( public.tsquery, public.tsquery )
- tsquery_gt( public.tsquery, public.tsquery )
- tsquery_in( cstring )
- tsquery_le( public.tsquery, public.tsquery )
- tsquery_lt( public.tsquery, public.tsquery )
- tsquery_ne( public.tsquery, public.tsquery )
- tsquery_not( public.tsquery )
- tsquery_or( public.tsquery, public.tsquery )
- tsquery_out( public.tsquery )
- tsvector_cmp( public.tsvector, public.tsvector )
- tsvector_concat( public.tsvector, public.tsvector )
- tsvector_eq( public.tsvector, public.tsvector )
- tsvector_ge( public.tsvector, public.tsvector )
- tsvector_gt( public.tsvector, public.tsvector )
- tsvector_in( cstring )
- tsvector_le( public.tsvector, public.tsvector )
- tsvector_lt( public.tsvector, public.tsvector )
- tsvector_ne( public.tsvector, public.tsvector )
- tsvector_out( public.tsvector )
- xml_encode_special_chars( text )
- xml_is_well_formed( text )
- xml_valid( text )
- xpath_bool( text, text )
- xpath_bool_ns( text, text, text, text )
- xpath_list( text, text )
- xpath_list( text, text, text )
- xpath_list_ns( text, text, text, text, text )
- xpath_nodeset( text, text )
- xpath_nodeset( text, text, text )
- xpath_nodeset( text, text, text, text )
- xpath_nodeset_ns( text, text, text, text )
- xpath_nodeset_ns( text, text, text, text, text )
- xpath_nodeset_ns( text, text, text, text, text, text )
- xpath_number( text, text )
- xpath_number_ns( text, text, text, text )
- xpath_string( text, text )
- xpath_string_ns( text, text, text, text )
- xpath_table( text, text, text, text, text )
- xpath_table_ns( text, text, text, text, text, text, text )
- xslt_process( text, text )
- xslt_process( text, text, text )
- reporter
- stats
Schema action
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);
Index -
Schema action
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 |
|
action.circulation Constraints
Name |
Constraint |
circulation_stop_fines_check |
CHECK ((stop_fines = ANY (ARRAY['CHECKIN'::text, 'CLAIMSRETURNED'::text, 'LOST'::text, 'MAXFINES'::text, 'RENEW'::text, 'LONGOVERDUE'::text]))) |
Index -
Schema action
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
|
Index -
Schema action
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 |
|
Index -
Schema action
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
|
action.hold_request Constraints
Name |
Constraint |
hold_request_hold_type_check |
CHECK ((hold_type = ANY (ARRAY['M'::text, 'T'::text, 'V'::text, 'C'::text]))) |
Tables referencing this one via Foreign Key Constraints:
Index -
Schema action
action.hold_transit_copy Structure
F-Key |
Name |
Type |
Description |
|
id |
integer |
PRIMARY KEY
DEFAULT nextval('"action".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 |
|
Index -
Schema action
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()
|
Index -
Schema action
Index -
Schema action
Index -
Schema action
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;
Index -
Schema action
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:
Index -
Schema action
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:
Index -
Schema action
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:
Index -
Schema action
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()
|
Index -
Schema action
Tables referencing this one via Foreign Key Constraints:
Index -
Schema action
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()
|
Index -
Schema action
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;
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.
*/
/*
* 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
|
Index -
Schema actor
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
|
Index -
Schema actor
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:
Index -
Schema actor
Tables referencing this one via Foreign Key Constraints:
Index -
Schema actor
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 |
|
Index -
Schema actor
actor.org_unit_proximity Structure
F-Key |
Name |
Type |
Description |
|
id |
bigserial |
PRIMARY KEY
|
|
from_org |
integer |
|
|
to_org |
integer |
|
|
prox |
integer |
|
Index -
Schema actor
/*
* 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
|
Index -
Schema actor
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:
Index -
Schema actor
/*
* 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:
Index -
Schema actor
/*
* 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
|
Index -
Schema actor
/*
* 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
|
Index -
Schema actor
/*
* 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
|
config.standing.id
|
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:
Index -
Schema actor
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:
Index -
Schema actor
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
|
Index -
Schema actor
/*
* 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
|
Index -
Schema actor
/*
* 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
|
Index -
Schema actor
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:
Index -
Schema actor
Returns: "trigger"
Language: PLPGSQL
BEGIN
NEW.passwd = MD5( NEW.passwd );
RETURN NEW;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
IF NEW.passwd <> OLD.passwd THEN
NEW.passwd = MD5( NEW.passwd );
END IF;
RETURN NEW;
END;
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);
Returns: SET OF org_unit
Language: SQL
SELECT a.*
FROM connectby('actor.org_unit','parent_ou','id','name',$1,'100','.')
AS t(keyid text, parent_keyid text, level int, branch text,pos int)
JOIN actor.org_unit a ON a.id = t.keyid
ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name;
Returns: SET OF org_unit
Language: SQL
SELECT *
FROM actor.org_unit_ancestors($1)
UNION
SELECT *
FROM actor.org_unit_ancestors($2);
Returns: SET OF org_unit
Language: SQL
SELECT *
FROM actor.org_unit_ancestors($1)
INTERSECT
SELECT *
FROM actor.org_unit_ancestors($2);
Returns: SET OF org_unit
Language: SQL
SELECT a.*
FROM connectby('actor.org_unit','id','parent_ou','name',$1,'100','.')
AS t(keyid text, parent_keyid text, level int, branch text,pos int)
JOIN actor.org_unit a ON a.id = t.keyid
ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name;
Returns: SET OF org_unit
Language: SQL
SELECT a.*
FROM connectby('actor.org_unit','id','parent_ou','name',
(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)
,'100','.')
AS t(keyid text, parent_keyid text, level int, branch text,pos int)
JOIN actor.org_unit a ON a.id = t.keyid
ORDER BY CASE WHEN a.parent_ou IS NULL THEN 0 ELSE 1 END, a.name;
Returns: SET OF org_unit
Language: SQL
SELECT *
FROM actor.org_unit_ancestors($1)
UNION
SELECT *
FROM actor.org_unit_descendants($1);
Returns: SET OF org_unit
Language: SQL
SELECT * FROM actor.org_unit_full_path((actor.org_unit_ancestor_at_depth($1, $2)).id)
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
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:
Index -
Schema asset
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
|
Index -
Schema asset
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) |
NOT NULL
DEFAULT 0.00
|
|
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
DEFAULT true
|
|
deleted |
boolean |
NOT NULL
DEFAULT false
|
asset.copy Constraints
Name |
Constraint |
copy_fine_level_check |
CHECK ((fine_level = ANY (ARRAY[1, 2, 3]))) |
copy_loan_duration_check |
CHECK ((loan_duration = ANY (ARRAY[1, 2, 3]))) |
Tables referencing this one via Foreign Key Constraints:
Index -
Schema asset
asset.copy_location Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
|
name |
text |
NOT NULL
|
actor.org_unit.id
|
owning_lib |
integer |
NOT NULL
|
|
holdable |
boolean |
NOT NULL
DEFAULT true
|
|
opac_visible |
boolean |
NOT NULL
DEFAULT true
|
|
circulate |
boolean |
NOT NULL
DEFAULT true
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema asset
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
|
Index -
Schema asset
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
|
Index -
Schema asset
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 = ANY (ARRAY[1, 2, 3]))) |
copy_transparency_loan_duration_check |
CHECK ((loan_duration = ANY (ARRAY[1, 2, 3]))) |
Tables referencing this one via Foreign Key Constraints:
Index -
Schema asset
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:
Index -
Schema asset
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:
Index -
Schema asset
Index -
Schema asset
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
|
Index -
Schema asset
Schema auditor
auditor.actor_org_unit_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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 |
|
|
opac_visible |
boolean |
NOT NULL
|
Index -
Schema auditor
auditor.actor_org_unit_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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 |
|
|
opac_visible |
boolean |
|
SELECT -1
, now
() AS audit_time
,'-' AS audit_action
, org_unit.id
, org_unit.parent_ou
, org_unit.ou_type
, org_unit.ill_address
, org_unit.holds_address
, org_unit.mailing_address
, org_unit.billing_address
, org_unit.shortname
, org_unit.name
, org_unit.email
, org_unit.phone
, org_unit.opac_visible
FROM actor.org_unit
UNION ALLSELECT actor_org_unit_history.audit_id AS "?column?"
, actor_org_unit_history.audit_time
, actor_org_unit_history.audit_action
, actor_org_unit_history.id
, actor_org_unit_history.parent_ou
, actor_org_unit_history.ou_type
, actor_org_unit_history.ill_address
, actor_org_unit_history.holds_address
, actor_org_unit_history.mailing_address
, actor_org_unit_history.billing_address
, actor_org_unit_history.shortname
, actor_org_unit_history.name
, actor_org_unit_history.email
, actor_org_unit_history.phone
, actor_org_unit_history.opac_visible
FROM auditor.actor_org_unit_history;
Index -
Schema auditor
auditor.actor_usr_address_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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
|
Index -
Schema auditor
auditor.actor_usr_address_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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 -1
, now
() AS audit_time
,'-' 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_id AS "?column?"
, 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;
Index -
Schema auditor
auditor.actor_usr_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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
|
Index -
Schema auditor
auditor.actor_usr_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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(6,2) |
|
|
last_xact_id |
text |
|
|
alert_message |
text |
|
|
create_date |
timestamp with time zone |
|
|
expire_date |
timestamp with time zone |
|
SELECT -1
, now
() AS audit_time
,'-' 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_id AS "?column?"
, 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;
Index -
Schema auditor
auditor.asset_call_number_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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
|
Index -
Schema auditor
auditor.asset_call_number_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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 -1
, now
() AS audit_time
,'-' AS audit_action
, call_number.id
, call_number.creator
, call_number.create_date
, call_number.editor
, call_number.edit_date
, call_number.record
, call_number.owning_lib
, call_number.label
, call_number.deleted
FROM asset.call_number
UNION ALLSELECT asset_call_number_history.audit_id AS "?column?"
, 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;
Index -
Schema auditor
auditor.asset_copy_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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
|
Index -
Schema auditor
auditor.asset_copy_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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(6,2) |
|
|
price |
numeric(8,2) |
|
|
barcode |
text |
|
|
circ_modifier |
text |
|
|
circ_as_type |
text |
|
|
dummy_title |
text |
|
|
dummy_author |
text |
|
|
alert_message |
text |
|
|
opac_visible |
boolean |
|
|
deleted |
boolean |
|
SELECT -1
, now
() AS audit_time
,'-' AS audit_action
,"copy".id
,"copy".circ_lib
,"copy".creator
,"copy".call_number
,"copy".editor
,"copy".create_date
,"copy".edit_date
,"copy".copy_number
,"copy".status
,"copy"."location"
,"copy".loan_duration
,"copy".fine_level
,"copy".age_protect
,"copy".circulate
,"copy".deposit
,"copy".ref
,"copy".holdable
,"copy".deposit_amount
,"copy".price
,"copy".barcode
,"copy".circ_modifier
,"copy".circ_as_type
,"copy".dummy_title
,"copy".dummy_author
,"copy".alert_message
,"copy".opac_visible
,"copy".deleted
FROM asset."copy"
UNION ALLSELECT asset_copy_history.audit_id AS "?column?"
, 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;
Index -
Schema auditor
auditor.biblio_record_entry_history Structure
F-Key |
Name |
Type |
Description |
|
audit_id |
bigint |
PRIMARY KEY
|
|
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
|
Index -
Schema auditor
auditor.biblio_record_entry_lifecycle Structure
F-Key |
Name |
Type |
Description |
|
?column? |
bigint |
|
|
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 -1
, now
() AS audit_time
,'-' AS audit_action
, record_entry.id
, record_entry.creator
, record_entry.editor
, record_entry.source
, record_entry.quality
, record_entry.create_date
, record_entry.edit_date
, record_entry.active
, record_entry.deleted
, record_entry.fingerprint
, record_entry.tcn_source
, record_entry.tcn_value
, record_entry.marc
, record_entry.last_xact_id
FROM biblio.record_entry
UNION ALLSELECT biblio_record_entry_history.audit_id AS "?column?"
, 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;
Index -
Schema auditor
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.actor_org_unit_history
SELECT nextval('auditor.actor_org_unit_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.actor_usr_address_history
SELECT nextval('auditor.actor_usr_address_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.actor_usr_history
SELECT nextval('auditor.actor_usr_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.asset_call_number_history
SELECT nextval('auditor.asset_call_number_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.asset_copy_history
SELECT nextval('auditor.asset_copy_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: "trigger"
Language: PLPGSQL
BEGIN
INSERT INTO auditor.biblio_record_entry_history
SELECT nextval('auditor.biblio_record_entry_pkey_seq'),
now(),
SUBSTR(TG_OP,1,1),
OLD.*;
RETURN NULL;
END;
Returns: boolean
Language: PLPGSQL
BEGIN
EXECUTE $$
CREATE SEQUENCE auditor.$$ || sch || $$_$$ || tbl || $$_pkey_seq;
$$;
EXECUTE $$
CREATE TABLE auditor.$$ || sch || $$_$$ || tbl || $$_history (
audit_id BIGINT PRIMARY KEY,
audit_time TIMESTAMP WITH TIME ZONE NOT NULL,
audit_action TEXT NOT NULL,
LIKE $$ || sch || $$.$$ || tbl || $$
);
$$;
EXECUTE $$
CREATE FUNCTION auditor.audit_$$ || sch || $$_$$ || tbl || $$_func ()
RETURNS TRIGGER AS $func$
BEGIN
INSERT INTO auditor.$$ || sch || $$_$$ || tbl || $$_history
SELECT nextval('auditor.$$ || sch || $$_$$ || tbl || $$_pkey_seq'),
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 -1, now() as audit_time, '-' as audit_action, *
FROM $$ || sch || $$.$$ || tbl || $$
UNION ALL
SELECT *
FROM auditor.$$ || sch || $$_$$ || tbl || $$_history;
$$;
RETURN TRUE;
END;
Schema authority
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
|
Index -
Schema authority
authority.rec_descriptor Structure
F-Key |
Name |
Type |
Description |
|
id |
bigserial |
PRIMARY KEY
|
|
record |
bigint |
|
|
record_status |
text |
|
|
char_encoding |
text |
|
Index -
Schema authority
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:
Index -
Schema authority
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()
|
Index -
Schema authority
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 = ANY
(ARRAY[
(
(
(
(main.tag)::integer + 400
)
)::text
)::bpchar
, (
(
(
(main.tag)::integer + 300
)
)::text
)::bpchar]
)
)
)
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 = ANY
(ARRAY['100'::bpchar
,'110'::bpchar
,'111'::bpchar
,'130'::bpchar
,'150'::bpchar
,'151'::bpchar
,'155'::bpchar
,'180'::bpchar
,'181'::bpchar
,'182'::bpchar
,'185'::bpchar]
)
)
AND (main.subfield = 'a'::text)
);
Index -
Schema authority
Schema biblio
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 biblio.next_autogen_tcn_value()
|
|
marc |
text |
NOT NULL
|
|
last_xact_id |
text |
NOT NULL
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema biblio
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()
|
Index -
Schema biblio
Returns: text
Language: PLPGSQL
BEGIN RETURN 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.
*/
config.audience_map Structure
F-Key |
Name |
Type |
Description |
|
code |
text |
PRIMARY KEY
|
|
value |
text |
NOT NULL
|
|
description |
text |
|
Index -
Schema config
/*
* 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))) |
Index -
Schema config
/*
* 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
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema config
/*
* 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:
Index -
Schema config
config.item_form_map Structure
F-Key |
Name |
Type |
Description |
|
code |
text |
PRIMARY KEY
|
|
value |
text |
NOT NULL
|
Index -
Schema config
config.item_type_map Structure
F-Key |
Name |
Type |
Description |
|
code |
text |
PRIMARY KEY
|
|
value |
text |
NOT NULL
|
Index -
Schema config
config.language_map Structure
F-Key |
Name |
Type |
Description |
|
code |
text |
PRIMARY KEY
|
|
value |
text |
NOT NULL
|
Index -
Schema config
config.lit_form_map Structure
F-Key |
Name |
Type |
Description |
|
code |
text |
PRIMARY KEY
|
|
value |
text |
NOT NULL
|
|
description |
text |
|
Index -
Schema config
/*
* 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 'mods'::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) = ANY (ARRAY['title'::text, 'author'::text, 'subject'::text, 'keyword'::text, 'series'::text]))) |
Tables referencing this one via Foreign Key Constraints:
Index -
Schema config
/*
* 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:
Index -
Schema config
/*
* 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:
Index -
Schema config
/*
* 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 ~ '^\\w+$'::text)) |
Index -
Schema config
/*
* 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 ~ '^\\w+$'::text)) |
Index -
Schema config
/*
* 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
|
config.rule_max_fine Constraints
Name |
Constraint |
rule_max_fine_name_check |
CHECK ((name ~ '^\\w+$'::text)) |
Index -
Schema config
/*
* 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 ~ '^\\w+$'::text)) |
Index -
Schema config
/*
* 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
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema config
config.xml_transform Structure
F-Key |
Name |
Type |
Description |
|
name |
text |
PRIMARY KEY
|
|
namespace_uri |
text |
UNIQUE
NOT NULL
|
|
prefix |
text |
NOT NULL
|
|
xslt |
text |
NOT NULL
|
Index -
Schema config
Schema container
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:
Index -
Schema container
Index -
Schema container
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:
Index -
Schema container
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()
|
Index -
Schema container
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:
Index -
Schema container
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()
|
Index -
Schema container
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:
Index -
Schema container
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()
|
Index -
Schema container
Schema metabib
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
|
Index -
Schema metabib
metabib.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
|
Index -
Schema metabib
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
|
Index -
Schema metabib
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:
Index -
Schema metabib
Index -
Schema metabib
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 |
|
Index -
Schema metabib
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
|
Index -
Schema metabib
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
|
Index -
Schema metabib
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
|
Index -
Schema metabib
Schema money
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 |
|
Index -
Schema money
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
, sum
(credit.amount) AS total_paid
, max
(credit.payment_ts) AS last_payment_ts
,"last"
(credit.note) AS last_payment_note
,"last"
(credit.payment_type) AS last_payment_type
, sum
(debit.amount) AS total_owed
, max
(debit.billing_ts) AS last_billing_ts
,"last"
(debit.note) AS last_billing_note
,"last"
(debit.billing_type) AS last_billing_type
, (COALESCE
(sum
(debit.amount)
, (0)::numeric
) - COALESCE
(sum
(credit.amount)
, (0)::numeric
)
) AS balance_owed
, p.relname AS xact_type
FROM (
(
(money.billable_xact xact
JOIN pg_class p
ON (
(xact.tableoid = p.oid)
)
)
LEFT JOIN money.billing debit
ON (
(
(xact.id = debit.xact)
AND (debit.voided IS FALSE)
)
)
)
LEFT JOIN money.payment_view credit
ON (
(
(xact.id = credit.xact)
AND (credit.voided IS FALSE)
)
)
)
GROUP BY xact.id
, xact.usr
, xact.xact_start
, xact.xact_finish
, p.relname
ORDER BY max
(debit.billing_ts)
, max
(credit.payment_ts);
Index -
Schema money
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
, sum
(credit.amount) AS total_paid
, max
(credit.payment_ts) AS last_payment_ts
,"last"
(credit.note) AS last_payment_note
,"last"
(credit.payment_type) AS last_payment_type
, sum
(debit.amount) AS total_owed
, max
(debit.billing_ts) AS last_billing_ts
,"last"
(debit.note) AS last_billing_note
,"last"
(debit.billing_type) AS last_billing_type
, (COALESCE
(sum
(debit.amount)
, (0)::numeric
) - COALESCE
(sum
(credit.amount)
, (0)::numeric
)
) AS balance_owed
, p.relname AS xact_type
FROM (
(
(money.billable_xact xact
JOIN pg_class p
ON (
(xact.tableoid = p.oid)
)
)
LEFT JOIN money.billing debit
ON (
(xact.id = debit.xact)
)
)
LEFT JOIN money.payment_view credit
ON (
(xact.id = credit.xact)
)
)
GROUP BY xact.id
, xact.usr
, xact.xact_start
, xact.xact_finish
, p.relname
ORDER BY max
(debit.billing_ts)
, max
(credit.payment_ts);
Index -
Schema money
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 |
|
Index -
Schema money
money.bnm_desk_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
|
actor.workstation.id
|
cash_drawer |
integer |
|
Index -
Schema money
money.bnm_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
|
Index -
Schema money
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)
)
);
Index -
Schema money
money.cash_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
|
|
cash_drawer |
integer |
|
Index -
Schema money
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)
)
);
Index -
Schema money
money.check_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
|
|
cash_drawer |
integer |
|
|
check_number |
text |
NOT NULL
|
Index -
Schema money
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 |
|
Index -
Schema money
money.credit_card_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
|
|
cash_drawer |
integer |
|
|
cc_type |
text |
NOT NULL
|
|
cc_number |
text |
NOT NULL
|
|
expire_month |
integer |
NOT NULL
|
|
expire_year |
integer |
NOT NULL
|
|
approval_code |
text |
NOT NULL
|
Index -
Schema money
money.credit_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
|
Index -
Schema money
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)
)
);
Index -
Schema money
money.forgive_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
|
Index -
Schema money
money.grocery Structure
F-Key |
Name |
Type |
Description |
|
id |
bigint |
PRIMARY KEY
DEFAULT nextval('money.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 |
|
Index -
Schema money
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 <> ALL
(ARRAY['cash_payment'::name
,'check_payment'::name
,'credit_card_payment'::name]
)
);
Index -
Schema money
money.open_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
, sum
(credit.amount) AS total_paid
, max
(credit.payment_ts) AS last_payment_ts
,"last"
(credit.note) AS last_payment_note
,"last"
(credit.payment_type) AS last_payment_type
, sum
(debit.amount) AS total_owed
, max
(debit.billing_ts) AS last_billing_ts
,"last"
(debit.note) AS last_billing_note
,"last"
(debit.billing_type) AS last_billing_type
, (COALESCE
(sum
(debit.amount)
, (0)::numeric
) - COALESCE
(sum
(credit.amount)
, (0)::numeric
)
) AS balance_owed
, p.relname AS xact_type
FROM (
(
(money.billable_xact xact
JOIN pg_class p
ON (
(xact.tableoid = p.oid)
)
)
LEFT JOIN money.billing debit
ON (
(
(xact.id = debit.xact)
AND (debit.voided IS FALSE)
)
)
)
LEFT JOIN money.payment_view credit
ON (
(
(xact.id = credit.xact)
AND (credit.voided IS FALSE)
)
)
)
WHERE (xact.xact_finish IS NULL)
GROUP BY xact.id
, xact.usr
, xact.xact_start
, xact.xact_finish
, p.relname
ORDER BY max
(debit.billing_ts)
, max
(credit.payment_ts);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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;
Index -
Schema money
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;
Index -
Schema money
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 |
|
Index -
Schema money
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)
)
);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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);
Index -
Schema money
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;
Index -
Schema money
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;
Index -
Schema money
money.work_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
|
Index -
Schema money
Schema offline
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
|
Index -
Schema offline
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
|
Index -
Schema offline
Schema permission
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
|
Index -
Schema permission
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:
Index -
Schema permission
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:
Index -
Schema permission
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
|
Index -
Schema permission
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
|
Index -
Schema permission
Returns: SET OF grp_tree
Language: SQL
SELECT a.*
FROM connectby('permission.grp_tree','parent','id','name',$1,'100','.')
AS t(keyid text, parent_keyid text, level int, branch text,pos int)
JOIN permission.grp_tree a ON a.id = t.keyid
ORDER BY
CASE WHEN a.parent IS NULL
THEN 0
ELSE 1
END, a.name;
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;
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;
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
public.copynotes Structure
F-Key |
Name |
Type |
Description |
|
copy |
integer |
|
|
value |
text |
|
Index -
Schema public
public.item_list Structure
F-Key |
Name |
Type |
Description |
|
cat_key |
integer |
|
|
call_key |
integer |
|
|
copy |
integer |
|
|
home_location |
text |
|
|
barcode |
text |
|
|
price |
integer |
|
|
item_type |
text |
|
|
owning_library |
text |
|
|
shadow |
boolean |
|
|
callnum |
text |
|
Index -
Schema public
public.pg_ts_cfg Structure
F-Key |
Name |
Type |
Description |
|
ts_name |
text |
PRIMARY KEY
|
|
prs_name |
text |
NOT NULL
|
|
locale |
text |
|
Index -
Schema public
public.pg_ts_cfgmap Structure
F-Key |
Name |
Type |
Description |
|
ts_name |
text |
PRIMARY KEY
|
|
tok_alias |
text |
PRIMARY KEY
|
|
dict_name |
text[] |
|
Index -
Schema public
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 |
|
Index -
Schema public
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 |
|
Index -
Schema public
Returns: text
Language: SQL
select prs_name from pg_ts_cfg where oid = show_curcfg()
Returns: text
Language: INTERNAL
aggregate_dummy
Returns: tsvector
Language: INTERNAL
aggregate_dummy
Returns: anyarray
Language: INTERNAL
aggregate_dummy
Returns: SET OF biblio_field_vtype
Language: SQL
SELECT * FROM biblio_field_table( $1, ARRAY[$2] )
Returns: SET OF biblio_field_vtype
Language: PLPGSQL
DECLARE
i INT;
rec biblio_field_vtype%ROWTYPE;
BEGIN
FOR i IN ARRAY_LOWER(field_list,1) .. ARRAY_UPPER(field_list,1) LOOP
FOR rec IN SELECT DISTINCT r, field_list[i], BTRIM(REGEXP_REPLACE(REGEXP_REPLACE(f, E'\n', ' ', 'g'), '[ ]+', ' ', 'g'))
FROM xpath_table_ns(
'id',
$$oils_xml_transform(marc,'$$ || (SELECT format FROM config.metabib_field WHERE id = field_list[i]) || $$')$$,
'biblio.record_entry',
(SELECT xpath FROM config.metabib_field WHERE id = field_list[i]),
'id = ' || record,
(SELECT x.prefix FROM config.xml_transform x JOIN config.metabib_field m ON (m.format = x.name) WHERE m.id = field_list[i]),
(SELECT x.namespace_uri FROM config.xml_transform x JOIN config.metabib_field m ON (m.format = x.name) WHERE m.id = field_list[i])
) AS t( r bigint, f text)
WHERE f IS NOT NULL LOOP
RETURN NEXT rec;
END LOOP;
END LOOP;
END;
Returns: text
Language: PLPERL
my $txt = shift;
$txt =~ s/^\s+//o;
$txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
$txt =~ s/\s+$//o;
if (/(\d{3}(?:\.\d+)?)/o) {
return $1;
} else {
return (split /\s+/, $txt)[0];
}
Returns: text
Language: SQL
SELECT SUBSTRING(call_number_dewey($1) FROM 1 FOR $2);
Returns: tsvector
Language: C
concat
Returns: SET OF record
Language: C
connectby_text
Returns: SET OF record
Language: C
connectby_text
Returns: SET OF record
Language: C
connectby_text_serial
Returns: SET OF record
Language: C
connectby_text_serial
Returns: SET OF record
Language: C
crosstab
Returns: SET OF record
Language: C
crosstab
Returns: SET OF record
Language: C
crosstab_hash
Returns: SET OF tablefunc_crosstab_2
Language: C
crosstab
Returns: SET OF tablefunc_crosstab_3
Language: C
crosstab
Returns: SET OF tablefunc_crosstab_4
Language: C
crosstab
Returns: internal
Language: C
dex_init
Returns: internal
Language: C
dex_lexize
Returns: boolean
Language: C
boolean operation with text index
exectsq
Returns: anyelement
Language: INTERNAL
aggregate_dummy
Returns: anyelement
Language: SQL
SELECT CASE WHEN $1 IS NULL THEN $2 ELSE $1 END;
Returns: internal
Language: C
gbt_bit_compress
Returns: boolean
Language: C
gbt_bit_consistent
Returns: internal
Language: C
gbt_bit_penalty
Returns: internal
Language: C
gbt_bit_picksplit
Returns: internal
Language: C
gbt_bit_same
Returns: gbtreekey_var
Language: C
gbt_bit_union
Returns: internal
Language: C
gbt_bpchar_compress
Returns: boolean
Language: C
gbt_bpchar_consistent
Returns: internal
Language: C
gbt_bytea_compress
Returns: boolean
Language: C
gbt_bytea_consistent
Returns: internal
Language: C
gbt_bytea_penalty
Returns: internal
Language: C
gbt_bytea_picksplit
Returns: internal
Language: C
gbt_bytea_same
Returns: gbtreekey_var
Language: C
gbt_bytea_union
Returns: internal
Language: C
gbt_cash_compress
Returns: boolean
Language: C
gbt_cash_consistent
Returns: internal
Language: C
gbt_cash_penalty
Returns: internal
Language: C
gbt_cash_picksplit
Returns: internal
Language: C
gbt_cash_same
Returns: gbtreekey8
Language: C
gbt_cash_union
Returns: internal
Language: C
gbt_date_compress
Returns: boolean
Language: C
gbt_date_consistent
Returns: internal
Language: C
gbt_date_penalty
Returns: internal
Language: C
gbt_date_picksplit
Returns: internal
Language: C
gbt_date_same
Returns: gbtreekey8
Language: C
gbt_date_union
Returns: internal
Language: C
gbt_decompress
Returns: internal
Language: C
gbt_float4_compress
Returns: boolean
Language: C
gbt_float4_consistent
Returns: internal
Language: C
gbt_float4_penalty
Returns: internal
Language: C
gbt_float4_picksplit
Returns: internal
Language: C
gbt_float4_same
Returns: gbtreekey8
Language: C
gbt_float4_union
Returns: internal
Language: C
gbt_float8_compress
Returns: boolean
Language: C
gbt_float8_consistent
Returns: internal
Language: C
gbt_float8_penalty
Returns: internal
Language: C
gbt_float8_picksplit
Returns: internal
Language: C
gbt_float8_same
Returns: gbtreekey16
Language: C
gbt_float8_union
Returns: internal
Language: C
gbt_inet_compress
Returns: boolean
Language: C
gbt_inet_consistent
Returns: internal
Language: C
gbt_inet_penalty
Returns: internal
Language: C
gbt_inet_picksplit
Returns: internal
Language: C
gbt_inet_same
Returns: gbtreekey16
Language: C
gbt_inet_union
Returns: internal
Language: C
gbt_int2_compress
Returns: boolean
Language: C
gbt_int2_consistent
Returns: internal
Language: C
gbt_int2_penalty
Returns: internal
Language: C
gbt_int2_picksplit
Returns: internal
Language: C
gbt_int2_same
Returns: gbtreekey4
Language: C
gbt_int2_union
Returns: internal
Language: C
gbt_int4_compress
Returns: boolean
Language: C
gbt_int4_consistent
Returns: internal
Language: C
gbt_int4_penalty
Returns: internal
Language: C
gbt_int4_picksplit
Returns: internal
Language: C
gbt_int4_same
Returns: gbtreekey8
Language: C
gbt_int4_union
Returns: internal
Language: C
gbt_int8_compress
Returns: boolean
Language: C
gbt_int8_consistent
Returns: internal
Language: C
gbt_int8_penalty
Returns: internal
Language: C
gbt_int8_picksplit
Returns: internal
Language: C
gbt_int8_same
Returns: gbtreekey16
Language: C
gbt_int8_union
Returns: internal
Language: C
gbt_intv_compress
Returns: boolean
Language: C
gbt_intv_consistent
Returns: internal
Language: C
gbt_intv_decompress
Returns: internal
Language: C
gbt_intv_penalty
Returns: internal
Language: C
gbt_intv_picksplit
Returns: internal
Language: C
gbt_intv_same
Returns: gbtreekey32
Language: C
gbt_intv_union
Returns: internal
Language: C
gbt_macad_compress
Returns: boolean
Language: C
gbt_macad_consistent
Returns: internal
Language: C
gbt_macad_penalty
Returns: internal
Language: C
gbt_macad_picksplit
Returns: internal
Language: C
gbt_macad_same
Returns: gbtreekey16
Language: C
gbt_macad_union
Returns: internal
Language: C
gbt_numeric_compress
Returns: boolean
Language: C
gbt_numeric_consistent
Returns: internal
Language: C
gbt_numeric_penalty
Returns: internal
Language: C
gbt_numeric_picksplit
Returns: internal
Language: C
gbt_numeric_same
Returns: gbtreekey_var
Language: C
gbt_numeric_union
Returns: internal
Language: C
gbt_oid_compress
Returns: boolean
Language: C
gbt_oid_consistent
Returns: internal
Language: C
gbt_oid_penalty
Returns: internal
Language: C
gbt_oid_picksplit
Returns: internal
Language: C
gbt_oid_same
Returns: gbtreekey8
Language: C
gbt_oid_union
Returns: internal
Language: C
gbt_text_compress
Returns: boolean
Language: C
gbt_text_consistent
Returns: internal
Language: C
gbt_text_penalty
Returns: internal
Language: C
gbt_text_picksplit
Returns: internal
Language: C
gbt_text_same
Returns: gbtreekey_var
Language: C
gbt_text_union
Returns: internal
Language: C
gbt_time_compress
Returns: boolean
Language: C
gbt_time_consistent
Returns: internal
Language: C
gbt_time_penalty
Returns: internal
Language: C
gbt_time_picksplit
Returns: internal
Language: C
gbt_time_same
Returns: gbtreekey16
Language: C
gbt_time_union
Returns: internal
Language: C
gbt_timetz_compress
Returns: boolean
Language: C
gbt_timetz_consistent
Returns: internal
Language: C
gbt_ts_compress
Returns: boolean
Language: C
gbt_ts_consistent
Returns: internal
Language: C
gbt_ts_penalty
Returns: internal
Language: C
gbt_ts_picksplit
Returns: internal
Language: C
gbt_ts_same
Returns: gbtreekey16
Language: C
gbt_ts_union
Returns: internal
Language: C
gbt_tstz_compress
Returns: boolean
Language: C
gbt_tstz_consistent
Returns: internal
Language: C
gbt_var_decompress
Returns: gbtreekey16
Language: C
gbtreekey_in
Returns: cstring
Language: C
gbtreekey_out
Returns: gbtreekey32
Language: C
gbtreekey_in
Returns: cstring
Language: C
gbtreekey_out
Returns: gbtreekey4
Language: C
gbtreekey_in
Returns: cstring
Language: C
gbtreekey_out
Returns: gbtreekey8
Language: C
gbtreekey_in
Returns: cstring
Language: C
gbtreekey_out
Returns: gbtreekey_var
Language: C
gbtreekey_in
Returns: cstring
Language: C
gbtreekey_out
Returns: text
Language: C
get_covers
Returns: internal
Language: C
gin_extract_tsquery
Returns: internal
Language: C
gin_extract_tsvector
Returns: boolean
Language: C
gin_ts_consistent
Returns: internal
Language: C
gtsq_compress
Returns: boolean
Language: C
gtsq_consistent
Returns: internal
Language: C
gtsq_decompress
Returns: gtsq
Language: C
gtsq_in
Returns: cstring
Language: C
gtsq_out
Returns: internal
Language: C
gtsq_penalty
Returns: internal
Language: C
gtsq_picksplit
Returns: internal
Language: C
gtsq_same
Returns: integer[]
Language: C
gtsq_union
Returns: internal
Language: C
gtsvector_compress
Returns: boolean
Language: C
gtsvector_consistent
Returns: internal
Language: C
gtsvector_decompress
Returns: gtsvector
Language: C
gtsvector_in
Returns: cstring
Language: C
gtsvector_out
Returns: internal
Language: C
gtsvector_penalty
Returns: internal
Language: C
gtsvector_picksplit
Returns: internal
Language: C
gtsvector_same
Returns: integer[]
Language: C
gtsvector_union
Returns: text
Language: C
headline
Returns: text
Language: C
headline
Returns: text
Language: C
headline_current
Returns: text
Language: C
headline_current
Returns: text
Language: C
headline_byname
Returns: text
Language: C
headline_byname
Returns: anyelement
Language: INTERNAL
aggregate_dummy
Returns: anyelement
Language: SQL
SELECT $2;
Returns: integer
Language: C
tsvector_length
Returns: text[]
Language: C
lexize
Returns: text[]
Language: C
lexize_bycurrent
Returns: text[]
Language: C
lexize_byname
Returns: SET OF double precision
Language: C
normal_rand
Returns: integer
Language: C
tsquery_numnode
Returns: "trigger"
Language: PLPGSQL
BEGIN
NEW.index_vector = to_tsvector(TG_ARGV[0], NEW.value);
RETURN NEW;
END;
Returns: text
Language: SQL
SELECT CASE WHEN (SELECT COUNT(*) FROM config.xml_transform WHERE name = $2 AND xslt = '---') > 0 THEN $1
ELSE xslt_process($1, (SELECT xslt FROM config.xml_transform WHERE name = $2))
END;
Returns: SET OF tokenout
Language: C
parse
Returns: SET OF tokenout
Language: C
parse_current
Returns: SET OF tokenout
Language: C
parse_byname
Returns: tsquery
Language: C
plainto_tsquery
Returns: tsquery
Language: C
plainto_tsquery_current
Returns: tsquery
Language: C
plainto_tsquery_name
Returns: void
Language: C
prsd_end
Returns: integer
Language: C
prsd_getlexeme
Returns: internal
Language: C
prsd_headline
Returns: internal
Language: C
prsd_lextype
Returns: internal
Language: C
prsd_start
Returns: text
Language: C
tsquerytree
Returns: real
Language: C
rank_def
Returns: real
Language: C
rank_def
Returns: real
Language: C
rank
Returns: real
Language: C
rank
Returns: real
Language: C
rank_cd_def
Returns: real
Language: C
rank_cd_def
Returns: real
Language: C
rank_cd
Returns: real
Language: C
rank_cd
Returns: void
Language: C
reset_tsearch
Returns: tsquery
Language: C
tsquery_rewrite_query
Returns: tsquery
Language: C
tsquery_rewrite
Returns: tsquery
Language: INTERNAL
aggregate_dummy
Returns: tsquery
Language: C
rewrite_accum
Returns: tsquery
Language: C
rewrite_finish
Returns: boolean
Language: C
boolean operation with text index
rexectsq
Returns: void
Language: C
set_curcfg
Returns: void
Language: C
set_curcfg_byname
Returns: void
Language: C
set_curdict
Returns: void
Language: C
set_curdict_byname
Returns: void
Language: C
set_curprs
Returns: void
Language: C
set_curprs_byname
Returns: tsvector
Language: C
setweight
Returns: oid
Language: C
show_curcfg
Returns: internal
Language: C
snb_en_init
Returns: internal
Language: C
snb_lexize
Returns: internal
Language: C
snb_ru_init_koi8
Returns: internal
Language: C
snb_ru_init_utf8
Returns: internal
Language: C
spell_init
Returns: internal
Language: C
spell_lexize
Returns: SET OF statinfo
Language: C
ts_stat
Returns: SET OF statinfo
Language: C
ts_stat
Returns: tsvector
Language: C
strip
Returns: internal
Language: C
syn_init
Returns: internal
Language: C
syn_lexize
Returns: text
Language: PLPGSQL
BEGIN
RETURN $1::regclass;
END;
Returns: text
Language: SQL
SELECT
CASE WHEN $1 IS NULL
THEN $2
WHEN $2 IS NULL
THEN $1
ELSE $1 || ' ' || $2
END;
Returns: internal
Language: C
thesaurus_init
Returns: internal
Language: C
thesaurus_lexize
Returns: tsquery
Language: C
to_tsquery
Returns: tsquery
Language: C
to_tsquery_current
Returns: tsquery
Language: C
to_tsquery_name
Returns: tsvector
Language: C
to_tsvector
Returns: tsvector
Language: C
to_tsvector_current
Returns: tsvector
Language: C
to_tsvector_name
Returns: SET OF tokentype
Language: C
token_type_current
Returns: SET OF tokentype
Language: C
token_type
Returns: SET OF tokentype
Language: C
token_type_byname
Returns: SET OF tsdebug
Language: SQL
select
m.ts_name,
t.alias as tok_type,
t.descr as description,
p.token,
m.dict_name,
strip(to_tsvector(p.token)) as tsvector
from
parse( _get_parser_from_curcfg(), $1 ) as p,
token_type() as t,
pg_ts_cfgmap as m,
pg_ts_cfg as c
where
t.tokid=p.tokid and
t.alias = m.tok_alias and
m.ts_name=c.ts_name and
c.oid=show_curcfg()
Returns: "trigger"
Language: C
tsearch2
Returns: boolean
Language: C
tsq_mcontained
Returns: boolean
Language: C
tsq_mcontains
Returns: tsquery
Language: C
tsquery_and
Returns: integer
Language: C
tsquery_cmp
Returns: boolean
Language: C
tsquery_eq
Returns: boolean
Language: C
tsquery_ge
Returns: boolean
Language: C
tsquery_gt
Returns: tsquery
Language: C
tsquery_in
Returns: boolean
Language: C
tsquery_le
Returns: boolean
Language: C
tsquery_lt
Returns: boolean
Language: C
tsquery_ne
Returns: tsquery
Language: C
tsquery_not
Returns: tsquery
Language: C
tsquery_or
Returns: cstring
Language: C
tsquery_out
Returns: integer
Language: C
tsvector_cmp
Returns: tsvector
Language: SQL
SELECT
CASE WHEN $1 IS NULL
THEN $2
WHEN $2 IS NULL
THEN $1
ELSE $1 || ' ' || $2
END;
Returns: boolean
Language: C
tsvector_eq
Returns: boolean
Language: C
tsvector_ge
Returns: boolean
Language: C
tsvector_gt
Returns: tsvector
Language: C
tsvector_in
Returns: boolean
Language: C
tsvector_le
Returns: boolean
Language: C
tsvector_lt
Returns: boolean
Language: C
tsvector_ne
Returns: cstring
Language: C
tsvector_out
Returns: text
Language: C
xml_encode_special_chars
Returns: boolean
Language: C
xml_is_well_formed
Returns: boolean
Language: C
xml_is_well_formed
Returns: boolean
Language: SQL
SELECT xpath_bool_ns($1,$2,'','')
Returns: boolean
Language: C
xpath_bool_ns
Returns: text
Language: SQL
SELECT xpath_list($1,$2,'')
Returns: text
Language: SQL
SELECT xpath_list_ns($1,$2,$3,'','')
Returns: text
Language: C
xpath_list_ns
Returns: text
Language: SQL
SELECT xpath_nodeset($1,$2,'','')
Returns: text
Language: SQL
SELECT xpath_nodeset($1,$2,'',$3)
Returns: text
Language: SQL
SELECT xpath_nodeset_ns($1,$2,$3,$4,'','')
Returns: text
Language: SQL
SELECT xpath_nodeset_ns($1,$2,'','',$3,$4)
Returns: text
Language: SQL
SELECT xpath_nodeset_ns($1,$2,'',$3,$4,$5)
Returns: text
Language: C
xpath_nodeset_ns
Returns: real
Language: SQL
SELECT xpath_number_ns($1,$2,'','')
Returns: real
Language: C
xpath_number_ns
Returns: text
Language: SQL
SELECT xpath_string_ns($1,$2,'','')
Returns: text
Language: C
xpath_string_ns
Returns: SET OF record
Language: C
xpath_table
Returns: SET OF record
Language: C
xpath_table_ns
Returns: text
Language: C
xslt_process
Returns: text
Language: C
xslt_process
Schema reporter
reporter.circ_type Structure
F-Key |
Name |
Type |
Description |
|
id |
bigint |
|
|
type |
text |
|
SELECT circulation.id
, CASE WHEN
(
(circulation.opac_renewal
OR circulation.phone_renewal
)
OR circulation.desk_renewal
) THEN 'RENEWAL'::text ELSE 'CHECKOUT'::text END AS "type"
FROM"action".circulation;
Index -
Schema reporter
reporter.demographic Structure
F-Key |
Name |
Type |
Description |
|
id |
integer |
|
|
dob |
timestamp with time zone |
|
|
general_division |
text |
|
SELECT u.id
, u.dob
, CASE WHEN
(u.dob IS NULL) THEN 'Adult'::text WHEN
(age
(u.dob) > '18 years'::interval
) THEN 'Adult'::text ELSE 'Juvenile'::text END AS general_division
FROM actor.usr u;
Index -
Schema reporter
reporter.hold_request_record Structure
F-Key |
Name |
Type |
Description |
|
id |
integer |
|
|
target |
bigint |
|
|
hold_type |
text |
|
|
bib_record |
bigint |
|
SELECT ahr.id
, ahr.target
, ahr.hold_type
, CASE WHEN
(ahr.hold_type = 'T'::text) THEN ahr.target WHEN
(ahr.hold_type = 'V'::text) THEN
(
SELECT cn.record
FROM asset.call_number cn
WHERE (cn.id = ahr.target)
) WHEN
(ahr.hold_type = 'C'::text) THEN
(
SELECT cn.record
FROM (asset.call_number cn
JOIN asset."copy" cp
ON (
(cn.id = cp.call_number)
)
)
WHERE (cp.id = ahr.target)
) WHEN
(ahr.hold_type = 'M'::text) THEN
(
SELECT mr.master_record
FROM metabib.metarecord mr
WHERE (mr.id = ahr.target)
) ELSE NULL::bigint END AS bib_record
FROM"action".hold_request ahr;
Index -
Schema reporter
reporter.output_folder Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
reporter.output_folder.id
|
parent |
integer |
|
actor.usr.id
|
owner |
integer |
NOT NULL
|
|
create_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
name |
text |
NOT NULL
|
|
shared |
boolean |
NOT NULL
DEFAULT false
|
actor.org_unit.id
|
share_with |
integer |
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema reporter
reporter.report Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
actor.usr.id
|
owner |
integer |
NOT NULL
|
|
create_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
name |
text |
NOT NULL
DEFAULT ''::text
|
|
description |
text |
NOT NULL
DEFAULT ''::text
|
reporter.template.id
|
template |
integer |
NOT NULL
|
|
data |
text |
NOT NULL
|
reporter.report_folder.id
|
folder |
integer |
NOT NULL
|
|
recur |
boolean |
NOT NULL
DEFAULT false
|
|
recurance |
interval |
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema reporter
reporter.report_folder Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
reporter.report_folder.id
|
parent |
integer |
|
actor.usr.id
|
owner |
integer |
NOT NULL
|
|
create_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
name |
text |
NOT NULL
|
|
shared |
boolean |
NOT NULL
DEFAULT false
|
actor.org_unit.id
|
share_with |
integer |
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema reporter
reporter.schedule Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
reporter.report.id
|
report |
integer |
NOT NULL
|
reporter.output_folder.id
|
folder |
integer |
NOT NULL
|
actor.usr.id
|
runner |
integer |
NOT NULL
|
|
run_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
start_time |
timestamp with time zone |
|
|
complete_time |
timestamp with time zone |
|
|
email |
text |
|
|
excel_format |
boolean |
NOT NULL
DEFAULT true
|
|
html_format |
boolean |
NOT NULL
DEFAULT true
|
|
csv_format |
boolean |
NOT NULL
DEFAULT true
|
|
chart_pie |
boolean |
NOT NULL
DEFAULT false
|
|
chart_bar |
boolean |
NOT NULL
DEFAULT false
|
|
chart_line |
boolean |
NOT NULL
DEFAULT false
|
|
error_code |
integer |
|
|
error_text |
text |
|
Index -
Schema reporter
reporter.simple_record Structure
F-Key |
Name |
Type |
Description |
|
id |
bigint |
|
|
metarecord |
bigint |
|
|
fingerprint |
text |
|
|
quality |
integer |
|
|
tcn_source |
text |
|
|
tcn_value |
text |
|
|
title |
text |
|
|
uniform_title |
text |
|
|
author |
text |
|
|
publisher |
text |
|
|
pubdate |
text |
|
|
series_title |
text |
|
|
series_statement |
text |
|
|
summary |
text |
|
|
isbn |
text[] |
|
|
issn |
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
, title.value AS title
, uniform_title.value AS uniform_title
, author.value AS author
, publisher.value AS publisher
,"substring"
(pubdate.value
,'\\d+'::text
) AS pubdate
, series_title.value AS series_title
, series_statement.value AS series_statement
, summary.value AS summary
, array_accum
("substring"
(isbn.value
,'^\\S+'::text
)
) AS isbn
, array_accum
("substring"
(issn.value
,'^\\S+'::text
)
) AS issn
, ARRAY
(
SELECT DISTINCT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '650'::bpchar)
AND (full_rec.subfield = 'a'::text)
)
AND (full_rec.record = r.id)
)
ORDER BY full_rec.value
) AS topic_subject
, ARRAY
(
SELECT DISTINCT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '651'::bpchar)
AND (full_rec.subfield = 'a'::text)
)
AND (full_rec.record = r.id)
)
ORDER BY full_rec.value
) AS geographic_subject
, ARRAY
(
SELECT DISTINCT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '655'::bpchar)
AND (full_rec.subfield = 'a'::text)
)
AND (full_rec.record = r.id)
)
ORDER BY full_rec.value
) AS genre
, ARRAY
(
SELECT DISTINCT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '600'::bpchar)
AND (full_rec.subfield = 'a'::text)
)
AND (full_rec.record = r.id)
)
ORDER BY full_rec.value
) AS name_subject
, ARRAY
(
SELECT DISTINCT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '610'::bpchar)
AND (full_rec.subfield = 'a'::text)
)
AND (full_rec.record = r.id)
)
ORDER BY full_rec.value
) AS corporate_subject
, ARRAY
(
SELECT full_rec.value
FROM metabib.full_rec
WHERE (
(
(full_rec.tag = '856'::bpchar)
AND (full_rec.subfield = ANY
(ARRAY['3'::text
,'y'::text
,'u'::text]
)
)
)
AND (full_rec.record = r.id)
)
ORDER BY CASE WHEN
(full_rec.subfield = ANY
(ARRAY['3'::text
,'y'::text]
)
) THEN 0 ELSE 1 END
) AS external_uri
FROM (
(
(
(
(
(
(
(
(
(
(biblio.record_entry r
JOIN metabib.metarecord_source_map s
ON (
(s.source = r.id)
)
)
LEFT JOIN metabib.full_rec uniform_title
ON (
(
(
(r.id = uniform_title.record)
AND (uniform_title.tag = '240'::bpchar)
)
AND (uniform_title.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec title
ON (
(
(
(r.id = title.record)
AND (title.tag = '245'::bpchar)
)
AND (title.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec author
ON (
(
(
(r.id = author.record)
AND (author.tag = '100'::bpchar)
)
AND (author.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec publisher
ON (
(
(
(r.id = publisher.record)
AND (publisher.tag = '260'::bpchar)
)
AND (publisher.subfield = 'b'::text)
)
)
)
LEFT JOIN metabib.full_rec pubdate
ON (
(
(
(r.id = pubdate.record)
AND (pubdate.tag = '260'::bpchar)
)
AND (pubdate.subfield = 'c'::text)
)
)
)
LEFT JOIN metabib.full_rec isbn
ON (
(
(
(r.id = isbn.record)
AND (isbn.tag = ANY
(ARRAY['024'::bpchar
,'020'::bpchar]
)
)
)
AND (isbn.subfield = ANY
(ARRAY['a'::text
,'z'::text]
)
)
)
)
)
LEFT JOIN metabib.full_rec issn
ON (
(
(
(r.id = issn.record)
AND (issn.tag = '022'::bpchar)
)
AND (issn.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec series_title
ON (
(
(
(r.id = series_title.record)
AND (series_title.tag = ANY
(ARRAY['830'::bpchar
,'440'::bpchar]
)
)
)
AND (series_title.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec series_statement
ON (
(
(
(r.id = series_statement.record)
AND (series_statement.tag = '490'::bpchar)
)
AND (series_statement.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec summary
ON (
(
(
(r.id = summary.record)
AND (summary.tag = '520'::bpchar)
)
AND (summary.subfield = 'a'::text)
)
)
)
WHERE (r.deleted IS FALSE)
GROUP BY r.id
, s.metarecord
, r.fingerprint
, r.quality
, r.tcn_source
, r.tcn_value
, title.value
, uniform_title.value
, author.value
, publisher.value
,"substring"
(pubdate.value
,'\\d+'::text
)
, series_title.value
, series_statement.value
, summary.value;
Index -
Schema reporter
reporter.super_simple_record Structure
F-Key |
Name |
Type |
Description |
|
id |
bigint |
|
|
fingerprint |
text |
|
|
quality |
integer |
|
|
tcn_source |
text |
|
|
tcn_value |
text |
|
|
title |
text |
|
|
author |
text |
|
|
publisher |
text |
|
|
pubdate |
text |
|
|
isbn |
text[] |
|
|
issn |
text[] |
|
SELECT r.id
, r.fingerprint
, r.quality
, r.tcn_source
, r.tcn_value
, title.value AS title
,"first"
(author.value) AS author
, publisher.value AS publisher
,"substring"
(pubdate.value
,'\\d+'::text
) AS pubdate
, array_accum
("substring"
(isbn.value
,'^\\S+'::text
)
) AS isbn
, array_accum
("substring"
(issn.value
,'^\\S+'::text
)
) AS issn
FROM (
(
(
(
(
(biblio.record_entry r
LEFT JOIN metabib.full_rec title
ON (
(
(
(r.id = title.record)
AND (title.tag = '245'::bpchar)
)
AND (title.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec author
ON (
(
(
(r.id = author.record)
AND (author.tag = ANY
(ARRAY['100'::bpchar
,'110'::bpchar
,'111'::bpchar]
)
)
)
AND (author.subfield = 'a'::text)
)
)
)
LEFT JOIN metabib.full_rec publisher
ON (
(
(
(r.id = publisher.record)
AND (publisher.tag = '260'::bpchar)
)
AND (publisher.subfield = 'b'::text)
)
)
)
LEFT JOIN metabib.full_rec pubdate
ON (
(
(
(r.id = pubdate.record)
AND (pubdate.tag = '260'::bpchar)
)
AND (pubdate.subfield = 'c'::text)
)
)
)
LEFT JOIN metabib.full_rec isbn
ON (
(
(
(r.id = isbn.record)
AND (isbn.tag = ANY
(ARRAY['024'::bpchar
,'020'::bpchar]
)
)
)
AND (isbn.subfield = ANY
(ARRAY['a'::text
,'z'::text]
)
)
)
)
)
LEFT JOIN metabib.full_rec issn
ON (
(
(
(r.id = issn.record)
AND (issn.tag = '022'::bpchar)
)
AND (issn.subfield = 'a'::text)
)
)
)
WHERE (r.deleted IS FALSE)
GROUP BY r.id
, r.fingerprint
, r.quality
, r.tcn_source
, r.tcn_value
, title.value
, publisher.value
,"substring"
(pubdate.value
,'\\d+'::text
);
Index -
Schema reporter
reporter.template Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
actor.usr.id
|
owner |
integer |
NOT NULL
|
|
create_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
name |
text |
NOT NULL
|
|
description |
text |
NOT NULL
|
|
data |
text |
NOT NULL
|
reporter.template_folder.id
|
folder |
integer |
NOT NULL
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema reporter
reporter.template_folder Structure
F-Key |
Name |
Type |
Description |
|
id |
serial |
PRIMARY KEY
|
reporter.template_folder.id
|
parent |
integer |
|
actor.usr.id
|
owner |
integer |
NOT NULL
|
|
create_time |
timestamp with time zone |
NOT NULL
DEFAULT now()
|
|
name |
text |
NOT NULL
|
|
shared |
boolean |
NOT NULL
DEFAULT false
|
actor.org_unit.id
|
share_with |
integer |
|
Tables referencing this one via Foreign Key Constraints:
Index -
Schema reporter
reporter.xact_billing_totals Structure
F-Key |
Name |
Type |
Description |
|
xact |
bigint |
|
|
unvoided |
numeric |
|
|
voided |
numeric |
|
|
total |
numeric |
|
SELECT b.xact
, sum
(CASE WHEN b.voided THEN
(0)::numeric ELSE b.amount END
) AS unvoided
, sum
(CASE WHEN b.voided THEN b.amount ELSE
(0)::numeric END
) AS voided
, sum
(b.amount) AS total
FROM money.billing b
GROUP BY b.xact;
Index -
Schema reporter
reporter.xact_paid_totals Structure
F-Key |
Name |
Type |
Description |
|
xact |
bigint |
|
|
unvoided |
numeric |
|
|
voided |
numeric |
|
|
total |
numeric |
|
SELECT b.xact
, sum
(CASE WHEN b.voided THEN
(0)::numeric ELSE b.amount END
) AS unvoided
, sum
(CASE WHEN b.voided THEN b.amount ELSE
(0)::numeric END
) AS voided
, sum
(b.amount) AS total
FROM money.payment b
GROUP BY b.xact;
Index -
Schema reporter
Schema stats
stats.fleshed_call_number Structure
F-Key |
Name |
Type |
Description |
|
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 |
|
|
create_date_day |
date |
|
|
edit_date_day |
date |
|
|
create_date_hour |
timestamp with time zone |
|
|
edit_date_hour |
timestamp with time zone |
|
|
item_lang |
text |
|
|
item_type |
text |
|
|
item_form |
text |
|
SELECT cn.id
, cn.creator
, cn.create_date
, cn.editor
, cn.edit_date
, cn.record
, cn.owning_lib
, cn.label
, cn.deleted
, (cn.create_date)::date AS create_date_day
, (cn.edit_date)::date AS edit_date_day
, date_trunc
('hour'::text
, cn.create_date
) AS create_date_hour
, date_trunc
('hour'::text
, cn.edit_date
) AS edit_date_hour
, rd.item_lang
, rd.item_type
, rd.item_form
FROM (asset.call_number cn
JOIN metabib.rec_descriptor rd
ON (
(rd.record = cn.record)
)
);
Index -
Schema stats
stats.fleshed_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 |
|
|
start_date_day |
date |
|
|
finish_date_day |
date |
|
|
start_date_hour |
timestamp with time zone |
|
|
finish_date_hour |
timestamp with time zone |
|
|
call_number_label |
text |
|
|
owning_lib |
integer |
|
|
item_lang |
text |
|
|
item_type |
text |
|
|
item_form |
text |
|
SELECT c.id
, c.usr
, c.xact_start
, c.xact_finish
, c.target_copy
, c.circ_lib
, c.circ_staff
, c.checkin_staff
, c.checkin_lib
, c.renewal_remaining
, c.due_date
, c.stop_fines_time
, c.checkin_time
, c.duration
, c.fine_interval
, c.recuring_fine
, c.max_fine
, c.phone_renewal
, c.desk_renewal
, c.opac_renewal
, c.duration_rule
, c.recuring_fine_rule
, c.max_fine_rule
, c.stop_fines
, (c.xact_start)::date AS start_date_day
, (c.xact_finish)::date AS finish_date_day
, date_trunc
('hour'::text
, c.xact_start
) AS start_date_hour
, date_trunc
('hour'::text
, c.xact_finish
) AS finish_date_hour
, cp.call_number_label
, cp.owning_lib
, cp.item_lang
, cp.item_type
, cp.item_form
FROM ("action".circulation c
JOIN stats.fleshed_copy cp
ON (
(cp.id = c.target_copy)
)
);
Index -
Schema stats
stats.fleshed_copy Structure
F-Key |
Name |
Type |
Description |
|
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(6,2) |
|
|
price |
numeric(8,2) |
|
|
barcode |
text |
|
|
circ_modifier |
text |
|
|
circ_as_type |
text |
|
|
dummy_title |
text |
|
|
dummy_author |
text |
|
|
alert_message |
text |
|
|
opac_visible |
boolean |
|
|
deleted |
boolean |
|
|
create_date_day |
date |
|
|
edit_date_day |
date |
|
|
create_date_hour |
timestamp with time zone |
|
|
edit_date_hour |
timestamp with time zone |
|
|
call_number_label |
text |
|
|
owning_lib |
integer |
|
|
item_lang |
text |
|
|
item_type |
text |
|
|
item_form |
text |
|
SELECT cp.id
, cp.circ_lib
, cp.creator
, cp.call_number
, cp.editor
, cp.create_date
, cp.edit_date
, cp.copy_number
, cp.status
, cp."location"
, cp.loan_duration
, cp.fine_level
, cp.age_protect
, cp.circulate
, cp.deposit
, cp.ref
, cp.holdable
, cp.deposit_amount
, cp.price
, cp.barcode
, cp.circ_modifier
, cp.circ_as_type
, cp.dummy_title
, cp.dummy_author
, cp.alert_message
, cp.opac_visible
, cp.deleted
, (cp.create_date)::date AS create_date_day
, (cp.edit_date)::date AS edit_date_day
, date_trunc
('hour'::text
, cp.create_date
) AS create_date_hour
, date_trunc
('hour'::text
, cp.edit_date
) AS edit_date_hour
, cn.label AS call_number_label
, cn.owning_lib
, rd.item_lang
, rd.item_type
, rd.item_form
FROM (
(asset."copy" cp
JOIN asset.call_number cn
ON (
(cp.call_number = cn.id)
)
)
JOIN metabib.rec_descriptor rd
ON (
(rd.record = cn.record)
)
);
Index -
Schema stats
Generated by PostgreSQL Autodoc
W3C HTML 4.01 Strict