User Tools

Site Tools


Sidebar

js#vista.png msort nsort

project-open:bugtracker_pgsql_function

Replacement Bugtracker PostGreSQL Function

For some reason somewhere in the 3.x¹ series one of the PostGreSQL functions got replaced with a function that provides absolutely no functionality at all in ]po[. It took me about 2 days to finally track this one down so I am posting it here because I need it every once in a while when at a client. ;)

create or replace function ad_group_member_p (integer, integer) returns char as 
'DECLARE
  p_user_id alias for $1;
  p_group_id alias for $2;
  ad_group_member_count integer;
BEGIN
  select count(*) into ad_group_member_count from acs_rels where object_id_one = p_group_id and object_id_two = p_user_id;

if ad_group_member_count = 0 then
  return ''f'';
else
  return ''t'';
end if;
end;'
language 'plpgsql';
  1. This fix is only viable until the BT gets switched out for the new one in the 4.x series of ]po[
project-open/bugtracker_pgsql_function.txt · Last modified: 2020/02/24 11:16 (external edit)