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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: sharmi_jo(at)yahoo(dot)com
Cc: General postgres mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to pipe the psql copy command to Unix 'Date' command
Date: 2009-02-19 17:31:16
Message-ID: 10000.1235064676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com> writes:
> Hi,
> I want to find the time taken by this process ...retrieving data from oracle database using java and copying that to postgres using 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message SHARMILA JOTHIRAJAH 2009-02-19 17:40:49 Re: How to pipe the psql copy command to Unix 'Date' command
Previous Message Kevin Murphy 2009-02-19 17:24:49 Aliasing syntax question