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

From Tom Lane
Subject Re: How to pipe the psql copy command to Unix 'Date' command
Date
Msg-id 10000.1235064676@sss.pgh.pa.us
Whole thread Raw
In response to How to pipe the psql copy command to Unix 'Date' command  (SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com>)
Responses Re: How to pipe the psql copy command to Unix 'Date' command
List pgsql-general
SHARMILA JOTHIRAJAH <sharmi_jo@yahoo.com> writes:
> 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

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

Or do you really insist on doing the timestamp subtraction by hand?

            regards, tom lane

pgsql-general by date:

Previous
From: Kevin Murphy
Date:
Subject: Aliasing syntax question
Next
From: SHARMILA JOTHIRAJAH
Date:
Subject: Re: How to pipe the psql copy command to Unix 'Date' command