dbTalk Databases Forums  

Postgres functions that return multiple values...

comp.databases.postgresql.questions comp.databases.postgresql.questions


Discuss Postgres functions that return multiple values... in the comp.databases.postgresql.questions forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jaye Gallagher
 
Posts: n/a

Default Postgres functions that return multiple values... - 05-17-2005 , 01:15 AM






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)
Begin
Set Result1 = 1;
Set Result2 = "Test";
Set Result3 = "Hello, World.";
Set Result4 = "3.14159";
End

Also, does Postgres even implement INOUT parameters to functions?

Thanks,
Jaye.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.