470,647 Members | 1,105 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Postgres functions that return multiple values...

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
0 3140

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Al Rosenthal | last post: by
reply views Thread by zerobearing2 | last post: by
3 posts views Thread by fjm67 | last post: by
17 posts views Thread by nergal | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.