Concerto won't load because of problem with permission.grp_ancestors on PostgreSQL 9.5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen master, PostgreSQL 9.5
While I was working on testing Ubuntu 16.04 (bug 1551084), I found that it ships with PostgreSQL 9.5. Along the way, I found an issue at the end of trying to load the concerto dataset. It bombs out on transactions.sql with an error like:
psql:transactio
DETAIL: SQL key field type text does not match return key field type integer.
CONTEXT: SQL statement "SELECT 2 IN (SELECT id FROM permission.
PL/pgSQL function inline_code_block line 15 at IF
Running just the piece for permission.
The following snippet comes from PG 9.1 vs. 9.5 and testing out that function:
With PG 9.1.20:
evergreen=# SELECT permission.
-------
(1,Users,,f,"3 years",
(3,Staff,1,f,"3 years",
(5,Circulators
(3 rows)
With PG 9.5.2:
evergreen=# SELECT permission.
ERROR: invalid return type
DETAIL: SQL key field type text does not match return key field type integer.
CONTEXT: SQL function "grp_ancestors" statement 1
Looking inside that function permission.
Will investigate further, but this was my first attempts at trying out PG 9.5 and Evergreen.
tags: | removed: bitesize |
Changed in evergreen: | |
assignee: | nobody → Mike Rylander (mrylander) |
Changed in evergreen: | |
milestone: | 2.next → 2.11-alpha |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
I'd call this one a bitesize bug, and suggest taking all the similar ancestor and descendant functions for org units from Open-ILS/ src/sql/ Pg/020. schema. functions. sql and simply translating them for use with the group tree. Whoever does this can just ignore any functions that have "_at_depth" in their name, as that uses org unit type information which doesn't have an analog in groups.