Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3721980
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:44:30+00:00 2026-05-19T05:44:30+00:00

I know Oracle and PL/SQL Compared to what I know about Oracle PL/SQL, I’m

  • 0

I know Oracle and PL/SQL

Compared to what I know about Oracle PL/SQL, I’m not very familiar with PostgreSQL’s stored procedures and plpgsql. In Oracle, there are two types of callables:

  • Procedures. They can have IN, OUT and IN OUT parameters, but no return values
  • Functions. They can have IN, OUT and IN OUT parameters and they MUST return a value

But I’m new to plpgsql

I understand that in plpgsql, all stored procedures are considered functions. To my understanding, this means, they can (but don’t have to) always return a value. Now I see on the documentation page, that I can also declare OUT parameters on functions, a thing that’s not possible in Oracle. But I don’t see an example or any clear statement about whether OUT parameters can be combined with return values. Neither can I see whether IN OUT parameters are possible.

So these are my questions:

  • Does plpgsql allow IN OUT parameters?
  • Does plpgsql allow OUT parameters to be combined with return values? Is this a common practice? Do you have examples for that?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T05:44:32+00:00Added an answer on May 19, 2026 at 5:44 am

    IN and OUT are basically aliases for older syntax.

    old way:

    create function test(param int) 
    returns integer as 
    $$ select 1 $$ 
    language sql;
    

    equivalent:

    create function test(in param int, out int)
    as $$ select 1 $$
    langauge sql;
    

    What params do provide is type information which basically creates an anonymous type for your return:

    create function test(in param, out int, out int)
    as $$ select 1, 2 $$
    langauge sql;
    

    now you can write:

     select * from test(1);
     column1 | column2 
    ---------+---------
           1 |       2
    

    Without the out params you would have have had to create a type or table that had two ints to cast the data to the right type:

    create or replace function test(in a int) 
    returns record as 
    as $$ select 1, 2 $$ 
    language sql;
                                    ^
    select * from test(1);
    ERROR:  a column definition list is required 
       for functions returning "record"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can PL/SQL procedure in Oracle know it's own name? Let me explain: CREATE OR
I am currently moving a product from SQL Server to Oracle. I am semi-familiar
Does anyone know why in Oracle 11g when you do a Count(1) with more
I cannot understand the Oracle documentation. :-( Does anybody know how to fetch multiple
When working with tables in Oracle, how do you know when you are setting
I have been tasked with comparing two oracle schema with a large number of
Does anyone know of a table or chart that compares the features of SQL
I've previously used sql-oracle just fine in Xemacs on XP and vista. However, now
Ok SQL and Oracle gurus I have a somewhat complicated query that I'm trying
We have a commercial software product under development. It supports Oracle, MySQL, and SQL*Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.