X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5CC5FD1BA94 for ; Fri, 27 Feb 2004 17:28:04 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 55127-04 for ; Fri, 27 Feb 2004 13:28:01 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 862EAD1BAD8 for ; Fri, 27 Feb 2004 13:28:00 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 44186351BF; Fri, 27 Feb 2004 09:28:00 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 4297635179; Fri, 27 Feb 2004 09:28:00 -0800 (PST) Date: Fri, 27 Feb 2004 09:28:00 -0800 (PST) From: Stephan Szabo To: Brian Knox Cc: pgsql-sql@postgresql.org Subject: Re: Convert INT to INTERVAL? In-Reply-To: <403F762B.20002@aol.net> Message-ID: <20040227092735.N87097@megazone.bigpanda.com> References: <403F762B.20002@aol.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/374 X-Sequence-Number: 17064 On Fri, 27 Feb 2004, Brian Knox wrote: > Is it possible within pl/pgsql, to convert an integer to an interval in > months? IE, if num_months is an INT set to 48, can it be converted to an > interval? You should be able to say something like num_months * INTERVAL '1 month' I believe.