Re: Stored Procedures - Mailing list pgsql-odbc

From Campbell, Greg
Subject Re: Stored Procedures
Date
Msg-id 43CBB971.3090408@us.michelin.com
Whole thread Raw
In response to Re: Stored Procedures  ("Minal A. Aryamane" <minalac@yes2etl.com>)
List pgsql-odbc
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

Attachment

pgsql-odbc by date:

Previous
From: "Minal A. Aryamane"
Date:
Subject: Re: Stored Procedures
Next
From: Markus Schaber
Date:
Subject: Re: [JDBC] Stored Procedures