Então entendi errado! 
Achei que ele estava conectado no servidor via ssh ou outra forma e queria
gravar em um micro remoto, ou seja, executou um psql no servidor e queria
gravar no micro no qual ele acessou o servidor.
Desculpem-me.
Marcio
-----Mensagem original-----
De: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Em nome de Osvaldo
Kussama
Enviada em: Saturday, March 01, 2008 18:25
Para: [email protected]
Assunto: Re: [pgbr-geral] RE S: RES: Exportar tabela pa txt




Marcio Clemes wrote:
> 
> Sugiro voce fazer um pequeno programa (pode ser em java) que rode no 
> micro onde voce estiver conectado.
> Se quiser, envio para voce.
> 
> []'s
> Marcio
>  
> 
> -----Mensagem original-----
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Em nome de Silfar 
> Goulart de Castro Enviada em: Friday, February 29, 2008 17:43
> Para: Comunidade PostgreSQL Brasileira
> Assunto: Re: [pgbr-geral] RES: Exportar tabela pa txt
> 
> é da pra fazer isso, mas não gostaria.
> 
> Alan Pablo escreveu:
>> Caro Thiago só por curiosidade vc vai utilizar esses txt pra que???
>>
>> Não da para deixar no servidor mesmo e compartilhar(samba) o diretório??
>> Ai é só mapear na estação.
>>
>> Ou eu to viajando??? :(
>>
>> Atenciosamente,
>>
>> Alan Pablo Queiroz Silva
>> Analista de Suporte
>> Fone: (69)3221-8000 / 3210-4175
>> Cell: (69) 9208-0147 / 8405-1110
>> E-mail: [EMAIL PROTECTED]
>> Msn: [EMAIL PROTECTED]
>>
>>
>> -----Mensagem original-----
>> De: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Em nome de 
>> Silfar Goulart de Castro Enviada em: sexta-feira, 29 de fevereiro de 
>> 2008
>> 11:39
>> Para: Comunidade PostgreSQL Brasileira
>> Assunto: Re: [pgbr-geral] Exportar tabela pa txt
>>
>> Não eu não quero usar o EMS pra isso, eu quero fazer uma procedure 
>> que eu possa executar de qualquer lugar, quero usar o ems só pra 
>> executar o comando de teste.
>>
>> Pensei que fosse simples, eu quero usar o comando copy e dizer onde 
>> ele deve gravar o txt.
>>
> 


Para isso não é necessário fazer nenhum programa. É só utilizar o comando
\copy do psql.
"\copy { table [ ( column_list ) ] | ( query ) } { from | to } { filename |
stdin | stdout | pstdin | pstdout } [ with ] [ binary ] [ oids ] [ delimiter
[ as ] 'character' ] [ null [ as ] 'string' ] [ csv [ header ] [ quote [ as
] 'character' ] [ escape [ as ] 'character' ] [ force quote column_list ] [
force not null column_list ] ]

    Performs a frontend (client) copy. This is an operation that runs an SQL
COPY command, but instead of the server reading or writing the specified
file, psql reads or writes the file and routes the data between the server
and the local file system. This means that file accessibility and privileges
are those of the local user, not the server, and no SQL superuser privileges
are required. "
http://www.postgresql.org/docs/8.3/interactive/app-psql.html


Osvaldo

--
View this message in context:
http://www.nabble.com/RES%3A--RES%3A--Exportar-tabela-pa-txt-tp15769632p1578
0581.html
Sent from the PostgreSQL - Brasil mailing list archive at Nabble.com.

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a