Projet

Général

Profil

Bug #7282

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

Ajouté par Benjamin Dauvergne il y a presque 9 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
Début:
19 mai 2015
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Non
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

Révisions associées

Révision 58ed6232 (diff)
Ajouté par Benjamin Dauvergne il y a presque 9 ans

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

fixes #7282

Historique

#1

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Description mis à jour (diff)
#2

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

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

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

This custom aggregate is installed on cresson.

#4

Mis à jour par Benjamin Dauvergne il y a presque 9 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#5

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#6

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF