Thread: function definition documentation

function definition documentation

From
"Gregory S. Williamson"
Date:
I am having an impossible time porting some simple Stored Procedures from Informix to postgres. The documentation is
almostself defeating. 

Are there any better descriptions of how to define functions that return several tuples to a wide variety of calling
programs(e.g. I can't count on my users running the psql command line tool, but rather coldfusion, jsp etc.) ? 

Thanks !

Greg Williamson
DBA
GlobeXplorer LLC


Re: function definition documentation

From
Richard Huxton
Date:
On Tuesday 23 March 2004 02:16, Gregory S. Williamson wrote:
> I am having an impossible time porting some simple Stored Procedures from
> Informix to postgres. The documentation is almost self defeating.
>
> Are there any better descriptions of how to define functions that return
> several tuples to a wide variety of calling programs (e.g. I can't count on
> my users running the psql command line tool, but rather coldfusion, jsp
> etc.) ?

You might want to look at the "Set Returning Functions" at the techdocs site:
http://techdocs.postgresql.org

Most of your problems are down to quoting issues and misleading error 
statements.

--  Richard Huxton Archonet Ltd


Re: function definition documentation

From
"Gregory S. Williamson"
Date:
Thanks muchly for the excellent tip. Lots of useful references there.

I seem to have battled through this thicket -- onwards !

Greg

-----Original Message-----
From: Richard Huxton [mailto:dev@archonet.com]
Sent: Tuesday, March 23, 2004 12:09 AM
To: Gregory S. Williamson; pgsql-sql@postgresql.org
Subject: Re: [SQL] function definition documentation


On Tuesday 23 March 2004 02:16, Gregory S. Williamson wrote:
> I am having an impossible time porting some simple Stored Procedures from
> Informix to postgres. The documentation is almost self defeating.
>
> Are there any better descriptions of how to define functions that return
> several tuples to a wide variety of calling programs (e.g. I can't count on
> my users running the psql command line tool, but rather coldfusion, jsp
> etc.) ?

You might want to look at the "Set Returning Functions" at the techdocs site:
http://techdocs.postgresql.org

Most of your problems are down to quoting issues and misleading error
statements.

--  Richard Huxton Archonet Ltd