By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,301 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,301 IT Pros & Developers. It's quick & easy.

Postgres functions that return multiple values...

P: n/a
Hi there,

I'm coming from a MS-SQL/MySQL background, and am trying to understand the
way Postgres phrases "stored procedure" type stuff.

What is mystifying me, in particular, is the fact that all Postgres
functions can only return one thing, even if that one thing is a bunch of
similar objects.

How can one phrase a stored procedure like this as a function in Postgres:

Create Procedure Test(
IN Input Integer,
OUT Result1 Integer,
OUT Result2 Char(4),
OUT Result3 Varchar(16),
OUT Result4 Double)
Set Result1 = 1;
Set Result2 = "Test";
Set Result3 = "Hello, World.";
Set Result4 = "3.14159";

Also, does Postgres even implement INOUT parameters to functions?

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.