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

From: Tim Landscheidt <tim(at)tim-landscheidt(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to get CURRENT_DATE in a pl/pgSQL function
Date: 2010-05-19 11:18:45
Message-ID: m3pr0si1gq.fsf@passepartout.tim-landscheidt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Brian Modra <brian(at)zwartberg(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jasen Betts 2010-05-19 11:25:57 Re: How to get CURRENT_DATE in a pl/pgSQL function
Previous Message silly sad 2010-05-19 08:26:07 Re: How to get CURRENT_DATE in a pl/pgSQL function