Re: Create Calendar - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: Create Calendar
Date
Msg-id 20041211041152.GA63199@winnie.fuhr.org
Whole thread Raw
In response to Create Calendar  ("Muhyiddin A.M Hayat" <middink@indo.net.id>)
List pgsql-sql
On Sat, Dec 11, 2004 at 03:26:33AM +0800, Muhyiddin A.M Hayat wrote:

> How to create Calendar using Function/View. 
> For example i would like to display date 2004-12-01 to 2004-12-20. 

You could write a function that returns SETOF DATE.  Some sections
of the documentation you'll want to study are:

"Data Types" chapter, "Date/Time Types" section

"Functions and Operators" chapter, "Date/Time Functions and
Operators" section

"PL/pgSQL - SQL Procedural Language" chapter, especially the
"Control Structures" section

If you have trouble then please post what you've tried with an
explanation of how you'd like it to work and a description of
what actually happens.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Cast NULL into Timestamp?
Next
From: Stephan Szabo
Date:
Subject: Re: Cast NULL into Timestamp?