| From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
|---|---|
| To: | Mark Fox <mark(dot)fox(at)gmail(dot)com> |
| Cc: | Dann Corbit <DCorbit(at)connx(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Days in month query |
| Date: | 2005-03-31 17:22:18 |
| Message-ID: | 20050331172218.GA9042@wolff.to |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Wed, Mar 30, 2005 at 16:45:43 -0700,
Mark Fox <mark(dot)fox(at)gmail(dot)com> wrote:
>
> What I want is SELECT statement that references no tables but returns
> the days in a given month. I'm now thinking that I might be able to
> come up with something using an IN clause and using EXTRACT, but
> haven't figured it out yet.
You can use the output of the suggested functions as input to
generate_series functions (new in 8.0) and add their output to the
start date of a month, to get a set of dates (as opposed to just a first
and last day of month).
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joshua D. Drake | 2005-03-31 17:44:07 | Re: storing files in postgres |
| Previous Message | Joseph M. Day | 2005-03-31 17:16:29 | Re: Temporary Tables |