How to pipe the psql copy command to Unix 'Date' command - Mailing list pgsql-general

From SHARMILA JOTHIRAJAH
Subject How to pipe the psql copy command to Unix 'Date' command
Date
Msg-id 592933.14174.qm@web110704.mail.gq1.yahoo.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Glyn Astill
Date:
Subject: Re: Query palns and tug-of-war with enable_sort
Next
From: Mirko Pace
Date:
Subject: Re: How to pipe the psql copy command to Unix 'Date' command