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 09D0854F6A for ; Tue, 8 Mar 2005 12:14:54 +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 44939-09 for ; Tue, 8 Mar 2005 12:14:49 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 462A954F2C for ; Tue, 8 Mar 2005 12:14:49 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 67C8B31DFC; Tue, 8 Mar 2005 13:14:52 +0100 (MET) From: "Fatih Cerit" X-Newsgroups: pgsql.sql Subject: plpgsql & date-time functions Date: Tue, 8 Mar 2005 14:14:47 +0200 Organization: Hub.Org Networking Services Lines: 10 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.185 tagged_above=0 required=5 tests=PRIORITY_NO_NAME X-Spam-Level: * X-Archive-Number: 200503/177 X-Sequence-Number: 20656 I have a function and I want to update a table's two rows but having problem with plpgsql & date-time functions. First field of the table must be now() this is ok.. but the second field must be now() + '60 days' if the query like this : SELECT INTO to_day now() + interval '60 days' ; it works but if I use variable instead of '60 days' it doesn't work. And I must use variable.... Thanks