X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C52583A6392 for ; Sat, 11 Dec 2004 04:27:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10851-08 for ; Sat, 11 Dec 2004 04:27:45 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 7C9493A6B7E for ; Sat, 11 Dec 2004 04:12:30 +0000 (GMT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.1/8.13.1) with ESMTP id iBB4Brf9004948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Dec 2004 21:11:56 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.1/8.13.1) with ESMTP id iBB4Brvn063245; Fri, 10 Dec 2004 21:11:53 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.1/8.13.1/Submit) id iBB4BqUd063244; Fri, 10 Dec 2004 21:11:52 -0700 (MST) (envelope-from mfuhr) Date: Fri, 10 Dec 2004 21:11:52 -0700 From: Michael Fuhr To: "Muhyiddin A.M Hayat" Cc: pgsql-sql@postgresql.org Subject: Re: Create Calendar Message-ID: <20041211041152.GA63199@winnie.fuhr.org> References: <003801c4deee$451eb6c0$1f00a8c0@middinks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003801c4deee$451eb6c0$1f00a8c0@middinks> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200412/53 X-Sequence-Number: 19673 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/