| От | Greg Smith |
|---|---|
| Тема | Re: Mechanics of Select |
| Дата | |
| Msg-id | Pine.GSO.4.64.0802101823430.29879@westnet.com обсуждение |
| Ответ на | Mechanics of Select (Willem Buitendyk <willem@pcfish.ca>) |
| Ответы |
Re: Mechanics of Select
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера