Re: Mechanics of Select - Mailing list pgsql-general

From Greg Smith
Subject Re: Mechanics of Select
Date
Msg-id Pine.GSO.4.64.0802101823430.29879@westnet.com
Whole thread Raw
In response to Mechanics of Select  (Willem Buitendyk <willem@pcfish.ca>)
Responses Re: Mechanics of Select
List pgsql-general
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@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Alter Temporary table in Stored Procedure
Next
From: Bill Moran
Date:
Subject: Re: Mechanics of Select