On Sun, 10 Feb 2008, Willem Buitendyk wrote:
I have the following function that returns the first day of the next month
from whatever date is inserted.
See if you can do this with date_trunc instead to avoid calling a
function, which avoids the whole thing. The first day of next month is:
select date_trunc('month',now())+interval '1 month';
I'd be curious how the runtime using that compares with the plpgsql
version you've done.
--
* Greg Smith gsmith@xxxxxxxxxxxxx http://www.gregsmith.com Baltimore, MD
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/