pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Landscheidt <tim@tim-landscheidt.de>
To: pgsql-sql@postgresql.org
Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
Date: Wed, 19 May 2010 11:18:45 +0000
Message-ID: <m3pr0si1gq.fsf@passepartout.tim-landscheidt.de> (raw)
References: <20100518190832.GQ3892@aart.is.rice.edu>
	<AANLkTimTUkyiFR0-o90bTmRHwK3T13mZTgyOu3m-gYMH@mail.gmail.com>
	<20100518192721.GS3892@aart.is.rice.edu>
	<m3d3wsn973.fsf@passepartout.tim-landscheidt.de>
	<AANLkTinOFwZPnQGpNqBuOOz2_BgvVr50MK3BYHqEJX-K@mail.gmail.com>

Brian Modra <brian@zwartberg.com> wrote:

>>> It works using 'now' and I assume that since curtime is
>>> of type DATE that the assignment casts the return automatically
>>> to type DATE. Thank you for the ideas.
>>> [...]

>> What's wrong with Pavel's correct and to-the-point answer?

> No need actually to cast... just use current_date without the quotes.
> Its not a string.

Where did Pavel suggest to cast or use a string?

Tim




view thread (11+ messages)  latest in thread

Message-ID: <m3pr0si1gq.fsf@passepartout.tim-landscheidt.de>
Permalink:  ../m3pr0si1gq.fsf@passepartout.tim-landscheidt.de/
Also on:    postgresql.org/message-id/m3pr0si1gq.fsf@passepartout.tim-landscheidt.de

 · 

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: tim@tim-landscheidt.de
  Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
  In-Reply-To: <m3pr0si1gq.fsf@passepartout.tim-landscheidt.de>

* 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