Re: Stored Procedures

From: "Campbell, Greg" <greg(dot)campbell(at)us(dot)michelin(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Stored Procedures
Date: 2006-01-16 15:19:13
Message-ID: 43CBB971.3090408@us.michelin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc 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(at)pzkagis(dot)cz>
> To: "Minal A. Aryamane" <minalac(at)yes2etl(dot)com>
> Cc: <pgsql-jdbc(at)postgresql(dot)org>; <pgsql-odbc(at)postgresql(dot)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 Content-Type Size
greg.campbell.vcf text/x-vcard 241 bytes

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gilbert, Antoine 2006-01-16 16:21:58 jdbc problem
Previous Message Minal A. Aryamane 2006-01-16 09:48:22 Re: [ODBC] Stored Procedures

Browse pgsql-odbc by date

  From Date Subject
Next Message Markus Schaber 2006-01-16 16:57:12 Re: [ODBC] Stored Procedures
Previous Message Minal A. Aryamane 2006-01-16 09:48:22 Re: [ODBC] Stored Procedures