Project

General

Profile

Bug #7282

the aggregate function max(boolean) does not exist on postgres, only sqlite

Added by Benjamin Dauvergne almost 6 years ago. Updated about 3 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
19 May 2015
Due date:
% Done:

100%

Estimated time:
Patch proposed:
No
Planning:

Description

I'm looking at creating my own aggregate function1 and adding it using a conditional migration.

[1]: http://www.postgresql.org/message-id/m3pstupmog.fsf@mobile.int.cbbrowne.com

Associated revisions

Revision 58ed6232 (diff)
Added by Benjamin Dauvergne almost 6 years ago

django_rbac: the aggregate function max(boolean) does not exist on postgres, only sqlite

fixes #7282

History

#1

Updated by Benjamin Dauvergne almost 6 years ago

  • Description updated (diff)
#2

Updated by Benjamin Dauvergne almost 6 years ago

Possible fix:

create or replace function bor (boolean, boolean)
  returns boolean as
$body$
select $1 or $2;
$body$ language sql;

create aggregate max(boolean) (
  sfunc=bor,
  stype=boolean,
  initcond=false,
);

#3

Updated by Benjamin Dauvergne almost 6 years ago

This custom aggregate is installed on cresson.

#4

Updated by Benjamin Dauvergne almost 6 years ago

  • Status changed from Nouveau to Résolu (à déployer)
  • % Done changed from 0 to 100
#5

Updated by Benjamin Dauvergne about 5 years ago

  • Status changed from Résolu (à déployer) to Solution déployée
#6

Updated by Benjamin Dauvergne about 3 years ago

  • Status changed from Solution déployée to Fermé

Also available in: Atom PDF