O'Reilly logo

PostgreSQL Server Programming by Jim Mlodgenski, Kirk Roybal, Hannu Krosing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OUT parameters and records

Using a pre-existing type, table, or view for compound return types is a simple mechanism for returning more complex structures. However, there is often a need to define the return type of the function with the function itself and not be dependent on other objects. This is especially true when managing changes to a running application, so over time two better ways to handle this have been added to PostgreSQL.

OUT parameters

Up until this point, all of the functions we have created have used parameters that are defined as IN parameters. The IN parameters are meant to just pass information into the function that can be used, but not returned. Parameters can also be defined as OUT or INOUT parameters if you want the function ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required