X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6CEA79DC857 for ; Mon, 16 Jan 2006 11:19:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71395-06 for ; Mon, 16 Jan 2006 11:19:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gk-us2.us.michelin.com (gk-us2.michelin.com [156.65.14.19]) by postgresql.org (Postfix) with ESMTP id 216989DC84E for ; Mon, 16 Jan 2006 11:19:13 -0400 (AST) Received: from oncpfxp4-out.onc.michelin.com (unverified [10.21.4.32]) by gk-us2.us.michelin.com (Clearswift SMTPRS 5.1.7) with ESMTP id for ; Mon, 16 Jan 2006 10:18:42 -0500 Received: from ONCMH1.onc.michelin.com (ONCMH1.onc.michelin.com [156.65.124.40]) by oncpfxp4-out.onc.michelin.com (Postfix) with ESMTP id A123A16DEF for ; Mon, 16 Jan 2006 10:19:17 -0500 (EST) Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Mon, 16 Jan 2006 10:19:17 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id IT6YK500.S3E for ; Mon, 16 Jan 2006 10:19:17 -0500 Received: from [10.43.12.183] (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Mon, 16 Jan 2006 10:19:16 -0500 Message-Id: <43CBB971.3090408@us.michelin.com> Date: Mon, 16 Jan 2006 10:19:13 -0500 From: "Campbell, Greg" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Stored Procedures References: <00ea01c61a77$92617a10$1502010a@aarnbee.com> <20060116085444.GA16920@soptik.pzkagis.cz> <000b01c61a81$fd2a77c0$1502010a@aarnbee.com> In-Reply-To: <000b01c61a81$fd2a77c0$1502010a@aarnbee.com> Content-Type: multipart/mixed; boundary="------------000104020608040301030001" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.215 required=5 tests=[AWL=0.063, RCVD_IN_WHOIS_INVALID=2.151, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 2.215 X-Spam-Level: ** X-Archive-Number: 200601/153 X-Sequence-Number: 6968 This is a multi-part message in MIME format. --------------000104020608040301030001 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit So, do you have access to the server command line to run psql and send commands? or pgAdmin? Does executing your stored procedure fail from there? Ths directory of mailing lists is available at http://www.postgresql.org/community/lists/ You are probably needed to address pgsql-general. That said, as a developer, I would tend to make a copy of the original, then comment out or rip out code until I find the problem. BTW your procedure definition looks strange CREATE OR REPLACE FUNCTION sp_build_course("varchar", "varchar", "varchar", "varchar") instead of CREATE OR REPLACE FUNCTION sp_build_course(VARCHAR, VARCHAR, VARCHAR, VARCHAR) Did pgAdmin build this? You call a procedure with 4 varchar parameters, yet I do not see the points in the procedure where they are substituted in $1, $2, $3, $4. Why send parameters is they are not used? You can read up on CREATE FUNCTION in the Postgresql docs. RTM, always a last resort. Kindly advice. Start with something ridiculously simple, then build it from there. Minal A. Aryamane wrote: > I dont knoiw if I have got the right mailing list, I thought some one will > be able to help me in this regard.. > > ----- Original Message ----- > From: "Ludek Finstrle" > To: "Minal A. Aryamane" > Cc: ; > Sent: Monday, January 16, 2006 2:24 PM > Subject: Re: [ODBC] Stored Procedures > > > >>Mon, Jan 16, 2006 at 02:03:48PM +0530, Minal A. Aryamane napsal(a): >> >>>I am trying to pass values through a jsp page wherein I am accessing >>>this stored procedures by the following select ststemet >> >>... >> >> >>>when I run it I get the following error: >>>ERROR: syntax error at or near "$1" at character 6 >>>CONTEXT: PL/pgSQL function "sp_build_course" line 45 at SQL statement. >>> >>>Can someone please look into the procedure and tell me where I have >>>gone wrong. >> >>Are you sure you choose the right pgsql lists? >>Does it work from psql command line client? If not it isn't odbc or jdbc >>related. >> >>Regards, >> >>Luf > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq --------------000104020608040301030001 Content-Type: text/x-vcard; charset=utf-8; name="greg.campbell.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="greg.campbell.vcf" begin:vcard fn:Greg Campbell n:Campbell;Greg org:Michelin North America - US5 Lexington;ENG-ASE email;internet:greg.campbell@us.michelin.com title:ASE Systems Engineer tel;work:803-951-5561/x75561 x-mozilla-html:FALSE version:2.1 end:vcard --------------000104020608040301030001--