"Ted Byers" <r.ted.byers@rogers.com> writes:
> I don't buy the suggestion that server side code is less error prone that
> client side code, but be that as it may, we're talking about a function that
> has one line of code. And given what you just said, you don't want the day of
> the week, you want a function that returns the week of the year. This can be
> had from the same Perl functions I mentioned before, with a minor alteration
> in how you call it. my suggestion would be to create that one line function
> that invokes the relevant Perl function, which can then be invoked in your
> select statement (presumably with a group clause to avoid mixing data from
> different years). It should take about ten to fifteen minutes to write and
> test?
There's no need to use Perl.
neo=# select extract('week' from now());
date_part
-----------
10
(1 registro)
neo=#
Today is a day at the tenth week of the year.
--
Jorge Godoy <jgodoy@gmail.com>