Found the query in question:
WITH RECURSIVE children AS (
SELECT d.conceptidfrom, d.conceptidto, c2.value, c2.valueid as
valueid, c.value as valueto, c.valueid as valueidto, c.valuetype as vtype,
1 AS depth, array[d.conceptidto] AS conceptpath, array[c.valueid] AS idpath
---|NonRecursive Part
FROM concepts.relations d
JOIN concepts.values c ON(c.conceptid = d.conceptidto)
JOIN concepts.values c2 ON(c2.conceptid = d.conceptidfrom)
WHERE d.conceptidfrom =
'5ff92cb0-df58-11e5-ae4b-179456d280d9'
and c2.valuetype = 'prefLabel'
and c.valuetype in ('prefLabel', 'sortorder', 'collector')
and (d.relationtype = 'member' or d.relationtype =
'hasTopConcept')
UNION
SELECT d.conceptidfrom, d.conceptidto, v2.value, v2.valueid
as valueid, v.value as valueto, v.valueid as valueidto, v.valuetype as
vtype, depth+1, (conceptpath || d.conceptidto), (idpath || v.valueid)
---|RecursivePart
FROM concepts.relations d
JOIN children b ON(b.conceptidto = d.conceptidfrom)
JOIN concepts.values v ON(v.conceptid = d.conceptidto)
JOIN concepts.values v2 ON(v2.conceptid = d.conceptidfrom)
WHERE v2.valuetype = 'prefLabel'
and v.valuetype in ('prefLabel','sortorder', 'collector')
and (d.relationtype = 'member' or d.relationtype =
'hasTopConcept')
) SELECT conceptidfrom, conceptidto, value, valueid, valueto,
valueidto, depth, idpath, conceptpath, vtype FROM children ORDER BY depth,
conceptpath;
After running this in Postico, all I get is:
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
Any ideas how to debug this?
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.