COPY TO Question?

Поиск
Список
Период
Сортировка
От Marc Abbott
Тема COPY TO Question?
Дата
Msg-id AE9526F06FFC114E9087A83BC2A648BB01E0AC3B@ZARDPEXCH001.medscheme.com
обсуждение исходный текст
Ответы Re: COPY TO Question?
Список pgsql-novice

This email is subject to a disclaimer which may be found on our website by clicking on this link: disclaimer. If you would prefer, the disclaimer can be emailed to you by clicking here.

 

 

Hi

 

I am currently running PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47). What I need to do is COPY FROM a file into a temp table (This I know how to do), then select and manipulate the data and write it back out to groups of files. I can insert the manipulated data into another table and then use COPY TO a file but what I would like to do is open a file with a name and write pipe delimited lines to it and close it and reopen the next file, write and so on ….. pretty similar to Oracle’s utl_file.fopen, utl_file.fclose, utl_file.put_line etc. Is this available in postgres?

 

Secondly, is it possible to FTP the same files to a different server? Would I need to write some form of shell script and execute it? If so how would I go about doing this from the DB?

 

Your help is appreciated.

 

Regards

Marc

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Selvakaruppiah s-TLS,Chennai"
Дата:
Сообщение: SetQueryTimeout in Postgres 8.1.4
Следующее
От: "Daniel Gour"
Дата:
Сообщение: Re: How to copy a schema under another name in same database