Re: AYUDA CON POSTGRESQL PARA GENERAR UN TXT DE UNA CONSULTA

From: Jose Rey <jrey(at)linuxsis(dot)net>
To: Ayuda Postgres <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: AYUDA CON POSTGRESQL PARA GENERAR UN TXT DE UNA CONSULTA
Date: 2005-06-16 18:39:58
Message-ID: 42B1C77E.8000303@linuxsis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

ruben avila wrote:

> es que necesito pg_query($cn,"COPY TO '/var/www/html/archivo.txt'
> WHIT DELIMITER '\t';");
> pg_query($cn,"unix2dos archivo.txt;");

No tengo mucha idea de lo que estás necesitando, pero no creo que sea la
forma de hacerlo, sin embargo ahi te va una solución:

pg_query($cn,"COPY TO '/var/www/html/archivo.txt' WHIT DELIMITER '\t';");
`/usr/bin/perl -lpi -e '$_ .= "\r"' /var/www/html/archivo.txt`;

Sin embargo sería mucho mejor generar el archivo desde PHP, creo yo.

Saludos
Jose Luis Rey

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Pepe Ballaga 2005-06-16 20:29:36 duda sobre function en postgress
Previous Message Alvaro Herrera 2005-06-16 17:52:29 Re: Baja de la lista