From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | "Tony G(dot) Harris" <tgharris_1(at)juno(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Trouble porting a Oracle PL/SQL procedure to PL/pgSQL |
Date: | 2003-06-17 04:42:54 |
Message-ID: | 10281.1055824974@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> On Mon, 16 Jun 2003, Tony G. Harris wrote:
>> The problem is, when I call the function, I get:
>> sql-practice=# select update_pay();
>> ERROR: pay_cursor: no such class
>> WARNING: plpgsql: ERROR during compile of update_pay near line 2
>> ERROR: pay_cursor: no such class
> I think it's complaining because you can't use pay_cursor%ROWTYPE.
Yeah, you're right. I didn't believe that theory at first because
the line number reference didn't point at the line with %ROWTYPE ...
but upon digging into it I find that plpgsql's code for determining
the line number to report is flat wrong for this case. (I've committed
a quick fix into CVS tip, but I wonder whether the whole mechanism
shouldn't be rethought. Calling plpgsql_scanner_lineno() all over the
place doesn't seem real clean.)
> Maybe declaring IndRec as being of type record may work (don't know
> for certain).
That's what I'd try. We don't consider that declaring a cursor creates
a named rowtype ... I'm surprised that Oracle seems to think it does.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | weigelt | 2003-06-17 05:28:37 | Re: Can the frontend get notifications from the postgres server? |
Previous Message | Anagha Joshi | 2003-06-17 04:39:04 | Can the frontend get notifications from the postgres server? |