Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BD3099F946C for ; Tue, 19 Dec 2006 16:21:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 32502-02-8 for ; Tue, 19 Dec 2006 16:21:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id A16899FA469 for ; Tue, 19 Dec 2006 16:20:58 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from amanda.contactbda.com (ipn36372-e65122.cidr.lightship.net [216.204.66.226]) by svr4.postgresql.org (Postfix) with ESMTP id 4832A5AF881 for ; Tue, 19 Dec 2006 20:20:53 +0000 (GMT) Received: from JIMSDELL2 (dhcp245.contactbda.com [192.168.1.245]) (authenticated bits=0) by amanda.contactbda.com (8.13.8/8.13.8/Debian-2) with ESMTP id kBJKKTBS011117; Tue, 19 Dec 2006 15:20:33 -0500 Message-Id: <200612192020.kBJKKTBS011117@amanda.contactbda.com> From: "Jim Buttafuoco" To: "'Richard Ray'" , Subject: Re: Help with quotes in plpgsql Date: Tue, 19 Dec 2006 15:20:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Thread-Index: Accjqbz1ChTWFkjKTUqQF7ZYZIEzeAAAUtEg In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/142 X-Sequence-Number: 27098 Try select into a now() - interval ($1 || ' day') -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Richard Ray Sent: Tuesday, December 19, 2006 3:10 PM To: pgsql-sql@postgresql.org Subject: [SQL] Help with quotes in plpgsql How should this be properly quoted create or replace function test(integer) returns setof text as $$ declare a record; begin select into a now() - interval '$1 day'; return next a; return; end $$ language 'plpgsql'; I'm not having a lot of luck Thanks Richard ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate