Page 1 sur 1

Version de postgresql

Posté : mar. janv. 11, 2022 11:19 am
par cln
Bonjour,

Pouvez-vous m'indiquer quelle la version minimale de Postgresql requise pour supporter Noalyss 9.024 ?

Cordialement.

Re: Version de postgresql

Posté : mar. janv. 11, 2022 12:23 pm
par dany2
Bonjour,

La version minimum est 9.5 et c'est testé jusque 14.0 .
PHP 7.4 idéalement , testé jusqu'à 8.1

Bonne journée


D.

Re: Version de postgresql

Posté : mar. janv. 11, 2022 12:50 pm
par cln
Merci, pour cette réponse rapide.
En fait je rencontre un problème lors de l'installation sur le script upgrade155.sql.
J'essaye d'installer Noalyss sur un serveur mutualisé O2switch.

Re: Version de postgresql

Posté : mar. janv. 11, 2022 2:43 pm
par dany2
Tiens ! Ce script https://gitlab.com/noalyss/noalyss/-/bl ... ade155.sql devrait passer .

Je pourrais connaître la version de postgresql et éventuellement mettre en mode DEBUG , l'erreur devrait s'afficher , sinon il faut regarder dans les logs de postgresql

https://wiki.noalyss.eu/doku.php?id=faq ... mode_debug

Re: Version de postgresql

Posté : mar. janv. 11, 2022 3:17 pm
par cln
J'ai la version suivante : Version base de données :9.2.24 ✓

Le script proposé est identique aux script figurant dans le dépot noalyss-9024.tar.gz.
Voici le message d'erreur que l'obtiens, toujours sur le script upgrade155.sql

create or replace function tmp_1 () returns void as $fct$ declare sCountry text; nOhada int; begin select count(*) into nOhada from tmp_pcmn where pcm_val='886' ; if nOhada = 1 then update parameter set pr_value='AF' where pr_id='MY_COUNTRY'; end if; select pr_value into sCountry from parameter where pr_id='MY_COUNTRY'; if sCountry = 'BE' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('755','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('655','Ecart de conversion','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '755' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '655' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; if sCountry = 'FR' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('758','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('658','Ecart de conversion ','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '758' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '658' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; end; $fct$ language plpgsql; SQL ERROR create or replace function tmp_1 () returns void as $fct$ declare sCountry text; nOhada int; begin select count(*) into nOhada from tmp_pcmn where pcm_val='886' ; if nOhada = 1 then update parameter set pr_value='AF' where pr_id='MY_COUNTRY'; end if; select pr_value into sCountry from parameter where pr_id='MY_COUNTRY'; if sCountry = 'BE' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('755','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('655','Ecart de conversion','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '755' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '655' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; if sCountry = 'FR' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('758','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('658','Ecart de conversion ','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '758' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '658' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; end; $fct$ language plpgsql; ERREUR: erreur de syntaxe sur ou près de « on » LIGNE 19 : ...lues ('755','Ecart de conversion','75','PRO','Y') on conflic... ^#0 /home/codi4682/comptasci.jodi.fr/include/lib/database_core.class.php(357): DatabaseCore->exec_sql('create or repla...') #1 /home/codi4682/comptasci.jodi.fr/include/class/database.class.php(149): DatabaseCore->execute_script('/home/codi4682/...') #2 /home/codi4682/comptasci.jodi.fr/html/install.php(658): Database->apply_patch('codi4682_compta...') #3 {main}ERREUR: erreur de syntaxe sur ou près de « on » LIGNE 19 : ...lues ('755','Ecart de conversion','75','PRO','Y') on conflic... ^
Fatal error: Uncaught Exception: SQL ERROR create or replace function tmp_1 () returns void as $fct$ declare sCountry text; nOhada int; begin select count(*) into nOhada from tmp_pcmn where pcm_val='886' ; if nOhada = 1 then update parameter set pr_value='AF' where pr_id='MY_COUNTRY'; end if; select pr_value into sCountry from parameter where pr_id='MY_COUNTRY'; if sCountry = 'BE' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('755','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('655','Ecart de conversion','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '755' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '655' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; if sCountry = 'FR' then insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('758','Ecart de conversion','75','PRO','Y') on conflict do nothing; insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use) values ('658','Ecart de conversion ','65','CHA','Y') on conflict do nothing; update public."parameter" set pr_value = '758' where pr_id= 'MY_DEFAULT_ROUND_ERROR_CRED'; update public."parameter" set pr_value = '658' where pr_id= 'MY_DEFAULT_ROUND_ERROR_DEB'; end if; end; $fct$ language plpgsql; ERREUR: erreur de syntaxe sur ou près de « on » LIGNE 19 : ...lues ('755','Ecart de conversion','75','PRO','Y') on conflic... ^ in /home/codi4682/comptasci.jodi.fr/include/lib/database_core.class.php:197 Stack trace: #0 /home/codi4682/comptasci.jodi.fr/include/lib/database_core.class.php(357): DatabaseCore->exec_sql('create or repla...') #1 /home/codi4682/comptasci.jodi.fr/include/class/database.class.php(149): DatabaseCore->execute_script('/home/codi4682/...') #2 /home/codi4682/comptasci.jodi.fr/html/install.php(658): Database->apply_patch('codi4682_compta...') #3 {main} thrown in /home/codi4682/comptasci.jodi.fr/include/lib/database_core.class.php on line 197

Re: Version de postgresql

Posté : mar. janv. 11, 2022 4:41 pm
par dany2
je vois le problème dans la 9.2 , cette syntaxe n'est pas supportée

Code : Tout sélectionner

 insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type,pcm_direct_use)
values ('755','Ecart de conversion','75','PRO','Y') on conflict do nothing;
Tu pourrais corriger le script et enlever le "on conflict do nothing" (laisser le ; à la fin) mais je ne sais pas si cela ne va pas coincer à un autre endroit.

9.2 n'est plus supportée par postgreSQL https://www.postgresql.org/docs/9.2/sql-insert.html depuis 2017

a+

D.

Re: Version de postgresql

Posté : mar. janv. 11, 2022 5:20 pm
par cln
J'ai supprimé le "on conflict do nothing".
Mais maintenant c'est le script upgrade171.sql qui ne passe pas.

Je vais en rester là en attendant que mon hébergeur mette à jour PostgreSql.
Encore merci pour votre aide.

Cordialement.

Re: Version de postgresql

Posté : mar. janv. 11, 2022 5:29 pm
par dany2
Oui sinon tu peux te faire héberger par NOALYSS https://www.noalyss.eu/?page_id=504