How to pipe the psql copy command to Unix 'Date' command

Поиск
Список
Период
Сортировка
От SHARMILA JOTHIRAJAH
Тема How to pipe the psql copy command to Unix 'Date' command
Дата
Msg-id 592933.14174.qm@web110704.mail.gq1.yahoo.com
обсуждение исходный текст
Ответы Re: How to pipe the psql copy command to Unix 'Date' command  (Mirko Pace <mirkop82@gmail.com>)
Re: How to pipe the psql copy command to Unix 'Date' command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,
I want to find the time taken by this process ...retrieving data from oracle database using java and copying that to
postgresusing copy. 
So I need something like this

Start_Time|java testCode ...|psql -c "copy dummy from stdin with delimiter ',' null 'NULL'" test| End_time

so that the output is like this

Start_time 2009-02-19 11:30:15
End_time 2009-02-19 11:40:15

This should give me the time this process started and the time it ended. Is  that possible?


Thanks
Sharmila




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

Предыдущее
От: Glyn Astill
Дата:
Сообщение: Re: Query palns and tug-of-war with enable_sort
Следующее
От: Mirko Pace
Дата:
Сообщение: Re: How to pipe the psql copy command to Unix 'Date' command