pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@rice.edu>
To: silly sad <sad@bankir.ru>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
Date: Wed, 19 May 2010 07:27:14 -0500
Message-ID: <20100519122714.GY3892@aart.is.rice.edu> (raw)
In-Reply-To: <4BF3A09F.9090906@bankir.ru>
References: <20100518190832.GQ3892@aart.is.rice.edu>
	<AANLkTimTUkyiFR0-o90bTmRHwK3T13mZTgyOu3m-gYMH@mail.gmail.com>
	<20100518192721.GS3892@aart.is.rice.edu>
	<4BF3A09F.9090906@bankir.ru>

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



view thread (11+ messages)

Message-ID: <20100519122714.GY3892@aart.is.rice.edu>
Permalink:  ../20100519122714.GY3892@aart.is.rice.edu/
Also on:    postgresql.org/message-id/20100519122714.GY3892@aart.is.rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ktm@rice.edu, sad@bankir.ru
  Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
  In-Reply-To: <20100519122714.GY3892@aart.is.rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox