Jumping Weekends

From: Ranieri Mazili <rmazili(at)wgsystems(dot)com(dot)br>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Jumping Weekends
Date: 2007-06-04 02:11:01
Message-ID: 466374B5.1030707@wgsystems.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
(sorry for my poor english)

It's my first post here, and my doubt is very simple (I guess). I have a
function to populate a table, into "WHILE" I have the follow piece of code:

--Jump Weekend
IF (SELECT TO_CHAR(CAST(PRODUCTION_DATE as date),'Day')) = 'Saturday' THEN
PRODUCTION_DATE := PRODUCTION_DATE + 2;
END IF;

It's to jump weekend adding 2 days on the variable "PRODUCTION_DATE",
the type of the variable is "DATE". But, I don't know why, it's doesn't
work properly, it's doesn't jump weekends, it's continues normally,
someone knows what's happen or what am I doing wrong?

I appreciate any help.
Thanks

Ranieri Mazili

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2007-06-04 02:21:25 Re: multimaster
Previous Message DiegoF 2007-06-04 00:38:32 Re: monitor stats