Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/06/2011, 10:39
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: shell desde phyton

Compadres.... solucionado.
Código SQL:
Ver original
  1. CREATE OR REPLACE FUNCTION copiar_archivos()
  2.   RETURNS text AS
  3. $BODY$
  4.  import os
  5.  os.system("sh archivo.sh");
  6. $BODY$
  7.   LANGUAGE plpythonu VOLATILE
  8.   COST 100;

Solo había que anteponer sh en la ejecución del archivo.

Muchas gracias a ambos. Han solucionado mi problema.
__________________
Without data, You are another person with an opinion.
W. Edwads Deming