From: | Suresh Raja <suresh(dot)rajaabc(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: localtime(0) |
Date: | 2014-12-29 17:25:40 |
Message-ID: | CAJP7dtD9tV0YrwkGgTPNYoYSCzBmOGLu7h0r9b1Q5ouMN459JA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
clock_timestamp() gives more than I need. i just need time, - no date, or
msec or timezone. How can i get to print the current time alone.
Thanks,
On Mon, Dec 29, 2014 at 10:41 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
wrote:
> On 12/29/2014 08:32 AM, Suresh Raja wrote:
>
>> Hi:
>>
>> I'm using localtime(0) in various part of the function, and updating
>> table with the time. I use localtime at places like the start of the
>> function and at the end of the function. The function takes about 5 mins
>> to run,. The issue is that the function always print the same time for
>> both start and end. I'm trying to capture the time at various point of
>> the function, but it always print the same time. Is localtime(0) is not
>>
>
> See:
>
> http://www.postgresql.org/docs/9.3/interactive/functions-datetime.html#
> FUNCTIONS-DATETIME-CURRENT
>
> In particular clock_timestamp()
>
> correct.
>>
>> Thanks,
>> -SR
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2014-12-29 17:38:34 | Re: Rollback on include error in psql |
Previous Message | wetter wetterana | 2014-12-29 17:22:28 | "ERROR: could not read block 4459549 in file "base/16384/16956.34": Result too large" |