Why pgsql function is working on vers 8.0/windows and not on ver 7.3.2/rad hat?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why pgsql function is working on vers 8.0/windows and not on ver 7.3.2/rad hat?

in-consulting.net
Hy,
I'm using a type defined by me: output_mt, on the function
CREATE OR REPLACE FUNCTION happy()
  RETURNS SETOF output_mt AS....
and when I want to initialize from another function:
CREATE OR REPLACE FUNCTION msg()
  RETURNS output_mt AS....
as: output_mt=msg();
it gaves me:
WARNING:  plpgsql: ERROR during compile of happy near line xx
ERROR:  parse error at or near "output_mt".
Why is this working on version 8.0 with windows and not on version 7.3.2 on linux, how can I solve this problem, do I need a cast or something ?
Thanks, Otto.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Why pgsql function is working on vers 8.0/windows and not on ver 7.3.2/rad hat?

Michael Fuhr
On Tue, Aug 02, 2005 at 01:52:41PM +0300, in-consulting.net wrote:

> I'm using a type defined by me: output_mt, on the function
> CREATE OR REPLACE FUNCTION happy()
>   RETURNS SETOF output_mt AS....
> and when I want to initialize from another function:
> CREATE OR REPLACE FUNCTION msg()
>   RETURNS output_mt AS....
> as: output_mt=msg();
> it gaves me:
> WARNING:  plpgsql: ERROR during compile of happy near line xx
> ERROR:  parse error at or near "output_mt".
> Why is this working on version 8.0 with windows and not on version 7.3.2 on linux, how can I solve this problem, do I need a cast or something ?

Could we see a complete example?  It would be easier to say what
the problem is if we could see the actual code and an unedited error
message.

Is output_mt a composite type?  8.0 does have better support for
composite types than previous versions; it also has better syntax
checking for PL/pgSQL functions.

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly