Allan Engelhardt <allane@cybaea.com> writes:
> Last Saturday problem is similar to above except for some sign
> reversals, but more interesting as you need the number of days in the
> month.
I'd be inclined to take the first day of the *next* month (relatively
easy to figure), and then back up to a Saturday using the 'dow' value
for that day.
regards, tom lane