#1 Le 08/09/2015, à 08:30
- michael10fr
comment executer une command postgresql en ligne de commande ?
Bonjour les amis,
impossible d'excuté la requête suivante en ligne de command batch .sh linux ??
psql -U fusionpbx -d fusionpbx -c 'UPDATE v_dialplan_details SET dialplan _detail_data = REPLACE(dialplan_detail_data, 'api_on_answer=uuid_record ${uuid} start ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/$ {strftime(%d)}/${uuid}.${record_ext}','api_on_answer=uuid_record ${uuid} start / backup/freeswitch/recordings/${domain_name}/archive/${strftime(%Y)}/${strftime(% b)}/${strftime(%d)}/${uuid}.${record_ext}') WHERE dialplan_detail_data LIKE '%ap i_on_answer=uuid_record ${uuid} start ${recordings_dir}/${domain_name}/archive/$ {strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext}%''
1541 psql -U fusionpbx -d fusionpbx -c "UPDATE v_dialplan_details SET dialplan _detail_data = REPLACE(dialplan_detail_data, 'api_on_answer=uuid_record ${uuid} start ${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/$ {strftime(%d)}/${uuid}.${record_ext}','api_on_answer=uuid_record ${uuid} start / backup/freeswitch/recordings/${domain_name}/archive/${strftime(%Y)}/${strftime(% b)}/${strftime(%d)}/${uuid}.${record_ext}') WHERE dialplan_detail_data LIKE '%ap i_on_answer=uuid_record ${uuid} start ${recordings_dir}/${domain_name}/archive/$ {strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext}%'"
pourquoi çà marche pas ?
alors que si je le fais avec adminer çà marche nikel ?
Voici la commande:
V_dialplan_details UPDATE
SET dialplan_detail_data = REPLACE (dialplan_detail_data 'api_on_answer uuid_record = $ {} UUIDstart${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext}',
'api_on_answer uuid_record = $ {} UUIDstart/backup/freeswitch/recordings/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext}')
Dialplan_detail_data OÙ LIKE '% api_on_answer uuid_record = $ {} UUIDstart${recordings_dir}/${domain_name}/archive/${strftime(%Y)}/${strftime(%b)}/${strftime(%d)}/${uuid}.${record_ext}%'
merci de votre aide
si vous pouvez m'aider car la je seche. avec un petit tuto.
Modération : merci à l'avenir d'utiliser les balises code (explications ici).
Dernière modification par cqfd93 (Le 08/09/2015, à 16:55)
Hors ligne