[Incidencias #14878] Re: Sequence reset incompatible with PostgreSQL 10+

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Jan 24 15:03:05 UTC 2019


NO CONTESTE A ESTE MENSAJE. ESTA DIRECCIÓN NO SE CONSULTA.

URL de la incidencia: https://bugs.horde.org/ticket/14878
------------------------------------------------------------------------------
  Incidencia        | 14878
  Actualizado por   | meberhardt at unl.edu.ar
  Resumen           | Sequence reset incompatible with PostgreSQL 10+
  Cola              | Horde Base
  Versión           | 5.2.20
  Tipo              | Bug
  Estado            | Unconfirmed
  Prioridad         | 2. Medium
  Milestone         |
  Patch             |
  Propietarios      |
------------------------------------------------------------------------------


stefan at stklcode.de (2018-11-26 11:16) escribió:

After upgrading the database from PostgreSQL 9.6 to 11 certain  
operations fail when trying to reset a sequence.

Example to reproduce:
Create a new event in Kronolith raises an error (see attached log).  
After refreshing the page the event is created successfully.

Cause:
Method "resetPkSequence" in file  
"pear/Horde/Db/Adapter/Postgresql/Schema.php" executes the following  
SQL:
SELECT setval(%s, (SELECT COALESCE(MAX(%s) + (SELECT increment_by FROM  
%s), (SELECT min_value FROM %s)) FROM %s), false)

Sequence column "increment_by" is no longer available in PostgreSQL 10  
and above.



stefan at stklcode.de (2018-11-26 11:16) cargado: horde-seq-pg11.log

https://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=horde-seq-pg11.log&ticket=14878&fn=%2Fhorde-seq-pg11.log





More information about the bugs mailing list