Re: Jumping Weekends

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ranieri Mazili <rmazili(at)wgsystems(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Jumping Weekends
Date: 2007-06-07 15:28:04
Message-ID: 20070607152804.GB15274@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Jun 03, 2007 at 11:11:01PM -0300, Ranieri Mazili wrote:
> 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:

To get a proper answer I think you're going to have to show the actual
loop, not just these two lines. But in any case, what you're trying to
do can be done more easily as:

IF date_part(PRODUCTION_DATE, 'dow') = 6 THE
PRODUCTION_DATE := PRODUCTION_DATE + 2;
END IF

(Please check calling convention, I wrote this of the top of my head).

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2007-06-07 15:30:42 Re: Auto Vacuum question?
Previous Message ABHANG RANE 2007-06-07 15:27:05 cube for real[]