Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
PostgreSQL 18 for Developers

You're reading from   PostgreSQL 18 for Developers Crafting flexible and intelligent data-driven solutions for today's enterprise

Arrow left icon
Product type Paperback
Published in Apr 2026
Publisher Packt
ISBN-13 9781806028474
Length 379 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Marc Linster Marc Linster
Author Profile Icon Marc Linster
Marc Linster
Vibhor Kumar Vibhor Kumar
Author Profile Icon Vibhor Kumar
Vibhor Kumar
Arrow right icon
View More author details
Toc

6Functions and Stored Procedures

Functions and procedures enable developers to package frequently used SQL statements and manage their execution using IF/THEN/LOOP and other control statements. Functions and procedures modularize and encapsulate business logic, making it easy to bring the logic to the data, rather than moving all the data from the database to the applications first. This minimizes the roundtrips between the application and data, significantly improving transaction performance and latency.Last, but not least, functions and stored procedures are important security mechanisms that can provide secure, selective access to data, without exposing the tables themselves.Functions have been supported since Postgres95, before it became PostgreSQL. Procedures were added in PostgreSQL Version 11.In this chapter, we will discuss the differences between functions and procedures, both in general and specifically in PostgreSQL. We will also examine functions and procedures that utilize...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PostgreSQL 18 for Developers
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon