Advertisement
chrissharp123

Untitled

Jan 25th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.69 KB | None | 0 0
  1. 024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-2] SELECT DISTINCT
  2. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-3] ahr.*,
  3. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-4] COALESCE(acplo.position, acpl_ordered.fallback_position) AS
  4. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-5] copy_location_order_position,
  5. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-6] CASE WHEN au.alias IS NOT NULL THEN
  6. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-7] au.alias
  7. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-8] ELSE
  8. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-9] au.first_given_name
  9. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-10] END AS usr_alias_or_first_given_name,
  10. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-11] au.first_given_name AS usr_first_given_name,
  11. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-12] au.second_given_name AS usr_second_given_name,
  12. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-13] au.family_name AS usr_family_name,
  13. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-14] au.prefix AS usr_prefix,
  14. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-15] au.suffix AS usr_suffix,
  15. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-16] au.alias AS usr_alias,
  16. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-17] CASE WHEN au.alias IS NOT NULL THEN
  17. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-18] au.alias
  18. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-19] ELSE
  19. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-20] REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
  20. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-21] COALESCE(au.family_name, ''),
  21. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-22] COALESCE(au.suffix, ''),
  22. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-23] ', ',
  23. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-24] COALESCE(au.prefix, ''),
  24. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-25] COALESCE(au.first_given_name, ''),
  25. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-26] COALESCE(au.second_given_name, '')
  26. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-27] ], ' '), E'\\s+,', ',')
  27. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-28] END AS usr_alias_or_display_name,
  28. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-29] REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
  29. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-30] COALESCE(au.family_name, ''),
  30. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-31] COALESCE(au.suffix, ''),
  31. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-32] ', ',
  32. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-33] COALESCE(au.prefix, ''),
  33. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-34] COALESCE(au.first_given_name, ''),
  34. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-35] COALESCE(au.second_given_name, '')
  35. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-36] ], ' '), E'\\s+,', ',') AS usr_display_name,
  36. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-37] TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
  37. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-38] AS call_number_label,
  38. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-39] siss.label AS issuance_label,
  39. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-40] (ahr.usr <> ahr.requestor) AS is_staff_hold,
  40. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-41] ahcm_1.copy_count AS potential_copies
  41. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-42] FROM action.hold_request ahr
  42. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-43] JOIN asset.copy acp ON (acp.id = ahr.current_copy)
  43. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-44] JOIN asset.call_number acn ON (acp.call_number = acn.id)
  44. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-45] JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
  45. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-46] JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
  46. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-47] JOIN actor.usr au ON (au.id = ahr.usr)
  47. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-48] JOIN (
  48. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-49] SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
  49. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-50] FROM asset.copy_location
  50. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-51] ) acpl_ordered ON (acpl_ordered.id = acp.location)
  51. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-52] LEFT JOIN actor.usr_standing_penalty ausp
  52. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-53] ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
  53. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-54] LEFT JOIN config.standing_penalty csp
  54. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-55] ON (
  55. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-56] csp.id = ausp.standing_penalty AND
  56. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-57] csp.block_list LIKE '%CAPTURE%' AND (
  57. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-58] (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
  58. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-59] (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
  59. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-60] SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
  60. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-61] )
  61. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-62] )
  62. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-63] )
  63. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-64] JOIN (
  64. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-65] SELECT COUNT(target_copy) AS copy_count, hold
  65. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-66] FROM action.hold_copy_map
  66. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-67] GROUP BY 2
  67. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-68] ) ahcm_1 ON (ahcm_1.hold = ahr.id)
  68. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-69] LEFT JOIN serial.issuance siss
  69. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-70] ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
  70. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-71] LEFT JOIN asset.copy_location_order acplo
  71. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-72] ON (acp.location = acplo.location AND
  72. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-73] acp.circ_lib = acplo.org)
  73. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-74] WHERE
  74. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-75] ahr.capture_time IS NULL AND
  75. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-76] ahr.cancel_time IS NULL AND
  76. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-77] csp.id IS NULL AND
  77. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-78] (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
  78. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-79] acp.deleted IS FALSE AND
  79. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-80] acp.status IN (SELECT id FROM config.copy_status WHERE holdable IS TRUE AND is_available IS TRUE)
  80. 2024-01-25 10:00:11 terran-testbox postgres[2542169]: [259-81] ) AS x WHERE 1=0;
  81.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement