Re: How to get CURRENT_DATE in a pl/pgSQL function

From: Kenneth Marshall <ktm(at)rice(dot)edu>
To: silly sad <sad(at)bankir(dot)ru>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
Date: 2010-05-19 12:27:14
Message-ID: 20100519122714.GY3892@aart.is.rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, May 19, 2010 at 12:26:07PM +0400, silly sad wrote:
> On 05/18/10 23:27, Kenneth Marshall wrote:
>
>> It works using 'now' and I assume that since curtime is
>
> now() is NOT the CURRENT timestamp in fact,
> it is about the timestamp of the current transaction has been started.
>
> it is the really USEFUL value, still u have to remember this meaning.
>
That is a good point. My main concern was locking the value
to to point when the pl/pgSQL function was called initially
because of the prepare process. Any of these will work if
assigned to a variable and not included directly in the SQL
statement.

Cheers,
Ken

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message David Harel 2010-05-19 14:56:52 user function and bind
Previous Message Jasen Betts 2010-05-19 11:25:57 Re: How to get CURRENT_DATE in a pl/pgSQL function