pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Campbell, Greg <greg.campbell@us.michelin.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Stored Procedures
Date: Mon, 16 Jan 2006 10:19:13 -0500
Message-ID: <43CBB971.3090408@us.michelin.com> (raw)
In-Reply-To: <000b01c61a81$fd2a77c0$1502010a@aarnbee.com>
References: <00ea01c61a77$92617a10$1502010a@aarnbee.com>
	<20060116085444.GA16920@soptik.pzkagis.cz>
	<000b01c61a81$fd2a77c0$1502010a@aarnbee.com>

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" <luf@pzkagis.cz>
> To: "Minal A. Aryamane" <minalac@yes2etl.com>
> Cc: <pgsql-jdbc@postgresql.org>; <pgsql-odbc@postgresql.org>
> 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

Attachments:

greg.campbell.vcf (text/x-vcard, 239B) download 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

view thread (9+ messages)  latest in thread

Message-ID: <43CBB971.3090408@us.michelin.com>
Permalink:  ../43CBB971.3090408@us.michelin.com/
Also on:    postgresql.org/message-id/43CBB971.3090408@us.michelin.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: greg.campbell@us.michelin.com
  Subject: Re: Stored Procedures
  In-Reply-To: <43CBB971.3090408@us.michelin.com>
  References: <00ea01c61a77$92617a10$1502010a@aarnbee.com> <20060116085444.GA16920@soptik.pzkagis.cz> <000b01c61a81$fd2a77c0$1502010a@aarnbee.com> <43CBB971.3090408@us.michelin.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox