473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Can postgres functions return multiple values???

hi.. i have a function which has 5 out parameters... can i return those in a postgre function...
Jun 4 '08 #1
7 9252
rski
700 Expert 512MB
of course you can using OUT parameters. If you don't know how put you function/problem here and i'll try to help you.
Jun 4 '08 #2
thank u so much.. i ll do that
Jun 4 '08 #3
i ll paste an orcale procedure here... i have to convert it into a postgres function...


CREATE OR REPLACE PROCEDURE ORCHCTADDDOCUMENT
(p_inxml IN OUT CLOB,
p_bravainfos OUT VARCHAR2,
p_duptitles OUT VARCHAR2,
p_outxml OUT CLOB,
p_outdocids OUT VARCHAR2
)
AS





will this declaration work in postgresql????
Jun 5 '08 #4
rski
700 Expert 512MB
Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE PROCEDURE ORCHCTADDDOCUMENT
  2. (IN OUT p_inxml CLOB,
  3. OUT p_bravainfos VARCHAR2,
  4. OUT p_duptitles VARCHAR2,
  5. OUT p_outxml CLOB,
  6. OUT p_outdocids VARCHAR2
  7. )
  8. AS
  9.  
but you must change datatypes, there are no varchar2 and clob in postgresql

i ll paste an orcale procedure here... i have to convert it into a postgres function...


CREATE OR REPLACE PROCEDURE ORCHCTADDDOCUMENT
(p_inxml IN OUT CLOB,
p_bravainfos OUT VARCHAR2,
p_duptitles OUT VARCHAR2,
p_outxml OUT CLOB,
p_outdocids OUT VARCHAR2
)
AS





will this declaration work in postgresql????
Jun 5 '08 #5
ya ya... i change them.... is there a row count function in postgres and is there a writetoCLOB funciton in postgres
Jun 5 '08 #6
rski
700 Expert 512MB
ya ya... i change them.... is there a row count function in postgres and is there a writetoCLOB funciton in postgres
To count rows you can use agregate function COUNT(*). There isn't CLOB type in Postgres so there is no writetoCLOB function. If I'm right you can implement CLOB with varchar.
Jun 5 '08 #7
oh ok ok..thanks for all the help... it was really helpful.. thank u very much
Jun 5 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Lupe | last post by:
hi, if someone can help me I would be grateful when I do def function kjklj llklç return variableA, variableB
0
by: Jaye Gallagher | last post by:
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...
4
by: Aaron | last post by:
can a method return multiple values? pseudo code public string method1() { //db pull select col1, col2, from tb1 s1 = col1;
3
by: smen | last post by:
hiye, can stored procedure return multiple @output's? thanks for replying...
14
by: Microsoft | last post by:
I know how to call a finction and pass a parameter to it, but I don;t understand how to take the resulting output of the function and use it from the subroutine that called the function ...
16
by: Nikolay Petrov | last post by:
How can I return multiple values from a custom function? TIA
12
by: Dennis D. | last post by:
Hello: I want a function to return three variables to the calling procedure: Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as Integer, ByVal iAddMins as Integer) As...
1
by: v4u2chat | last post by:
Do I need to extend any of classes from AXIS to return multiple values? I'm exposing the following method as web service through AXIS to return multiple values. public ContactAddress...
2
ADezii
by: ADezii | last post by:
The incentive for this Tip was an Article by the amazing Allen Browne - I considered it noteworthy enough to post as The Tip of the Week in this Access Forum. Original Article by Allen Browne ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.