Understand the extension framework of PostgreSQL, and leverage it in ways that you haven't even invented yet.
- Write functions, create your own data types, all in your favourite programming language
- Step-by-step tutorial with plenty of tips and tricks to kick-start server programming.
Learn how to work with PostgreSQL as if you spent the last decade working on it. PostgreSQL is capable of providing you with all of the options that you have in your favourite development language and then extending that right on to the database server. With this knowledge in hand, you will be able to respond to the current demand for advanced PostgreSQL skills in a lucrative and booming market.
"PostgreSQL Server Programming" will show you that PostgreSQL is so much more than a database server. In fact, it could even be seen as an application development framework, with the added bonuses of transaction support, massive data storage, journaling, recovery and a host of other features that the PostgreSQL engine provides.
This book will take you from learning the basic parts of a PostgreSQL function, then writing them in languages other than the built-in PL/PgSQL. You will see how to create libraries of useful code, group them into even more useful components, and distribute them to the community. You will see how to extract data from a multitude of foreign data sources, and then extend PostgreSQL to do it natively. And you can do all of this in a nifty debugging interface that will allow you to do it efficiently and with reliability.
What you will learn from this book
- Write functions in the built-in PL/PgSQL language or your language of choice
- Extract data from foreign data sources
- Add operators, data types, and other custom elements
- Debug and code efficiently
- Decide what machine resources your process will use
- Create your own data types, operators, functions, aggregates, and even your own language
- Fully integrate the database layer into your development
This practical guide leads you through numerous aspects of working with PostgreSQL. Step by step examples allow you to easily set up and extend PostgreSQL.
Who this book is written for
"PostgreSQL Server Programming" is for moderate to advanced PostgreSQL database professionals. To get the best understanding of this book, you should have general experience in writing SQL, a basic idea of query tuning, and some coding experience in a language of your choice
Table of Contents
Chapter 1: What Is a PostgreSQL Server?
Chapter 2: Server Programming Environment
Chapter 3: Your First PL/pgSQL Function
Chapter 4: Returning Structured Data
Chapter 5: PL/pgSQL Trigger Functions
Chapter 6: Debugging PL/pgSQL
Chapter 7: Using Unrestricted Languages
Chapter 8: Writing Advanced Functions in C
Chapter 9: Scaling Your Database with PL/Proxy
Chapter 10: Publishing Your Code as PostgreSQL Extensions