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

From: Mirko Pace <mirkop82(at)gmail(dot)com>
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:07:49
Message-ID: 8eae94e10902190907r497ba9eas7c5b5fbfbe49d3c5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why not call a function that make an insert as "insert into dummy values
('Start',now())" ?

Mirko

On Thu, Feb 19, 2009 at 5:37 PM, SHARMILA JOTHIRAJAH <sharmi_jo(at)yahoo(dot)com>wrote:

> 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
>
> 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
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

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