calling a stored procedure using sql query in 7.4

From: "BaseTwo" <digimotif(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: calling a stored procedure using sql query in 7.4
Date: 2007-03-30 18:56:20
Message-ID: 1175280980.616655.226660@d57g2000hsg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've created some sql scripts to update a database in version 8.x and
now I'm trying to get them to run on servers using v7.4

The following statement works on 8.x servers, but not on 7.4 and I
can't figure out how to get it to operate in the earlier version:

select calc_cum_gpa_mp(marking_period_id::TEXT)
from (select distinct marking_period_id from student_mp_stats) as
sms1;

I get the error:

ERROR: syntax error at or near "("
SQL state: 42601
Context: compile of PL/pgSQL function "calc_cum_gpa_mp" near line 8

Can anyone point me in the right direction? I've searched everywhere
for how to use stored procedures in sql queries, and haven't found how
to use the subquery to feed values to the stored procedure. It almost
looks like I'd need to create another plpgsql function with a loop to
do the same thing.

Brian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-30 18:57:30 Re: unexpected data beyond EOF and character encoding
Previous Message Stefan Kaltenbrunner 2007-03-30 18:52:47 Re: unexpected data beyond EOF and character encoding