Synopses & Reviews
Thinking of migrating to PostgreSQL? This updated guide helps you quickly understand and use the 9.3 release of this open source database system. Youll not only learn about its unique enterprise-class features, but also discover that PostgeSQL is more than just a database system—its also an impressive application platform.
Using numerous examples, this book shows you how to achieve tasks that are difficult or impossible in other databases. The second edition covers LATERAL queries, augmented JSON support, materialized views, and other key topics. If youre an existing PostgreSQL user, youll pick up gems you may have missed along the way.
- Learn basic administration tasks, such as role management, database creation, backup, and restore
- Apply the psql command-line utility and the pgAdmin graphical administration tool
- Explore PostgreSQL tables, constraints, and indexes
- Learn powerful SQL constructs not generally found in other databases
- Use several different languages to write database functions
- Tune your queries to run as fast as your hardware will allow
- Query external and variegated data sources with Foreign Data Wrappers
- Learn how to replicate data, using built-in replication features
People who are considering migrating to PostgreSQL from MySQL, MSSQL, or Oracle. This book will give them a quick overview of the plethora of features that comes stock with PostgreSQL that you cant get with the others or that are pricey add-ons with the others.
About the Author
Regina Obe holds a BS degree in mechanical engineering from the Massachusetts Institute of Technology with a concentration in Bioelectronics and control theory. She has over 15 years professional experience in various programming languages and database systems. Regina focuses on sales, project cost estimation, high-level programming and troubleshooting, providing technical guidance to programming staff, and one-on-one mentoring to clients in various programming and database disciplines. She is also the resident expert on PostGIS spatial database engine and other Open Geospatial technologies. She is a member of the PostGIS project steering committee and the PostGIS core development team. She is a co-author of the book PostGIS in Action.
Leo Hsu holds an MS degree in engineering of economic systems from Stanford University. He also holds dual BS degrees in mechanical engineering and economics from the Massachusetts Institute of Technology with a minor in Finance. He has over 15 years professional experience working for and with Federal, State, non-profits and Dot coms developing automated pricing and process applications and devising workflow strategies. His education and experience runs the gamut from programming, economics, statistics, operations research, database systems and application architecture, mechanical engineering, control theory and game theory. Leo focuses on advanced database design, application architecture, and overall project management. He is the resident SQL expert. He is a co-author of the book PostGIS in Action.
Table of Contents
Preface; What Makes PostgreSQL Special and Why Use It?; Why Not PostgreSQL?; For More Information on PostgreSQL; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Chapter 1: The Basics; 1.1 Where to Get PostgreSQL; 1.2 Administration Tools; 1.3 What's New in Latest Versions of PostgreSQL?; 1.4 Database Drivers; 1.5 Server and Database Objects; 1.6 Where to Get Help; Chapter 2: Database Administration; 2.1 Configuration Files; 2.2 Setting Up Groups and Login Roles (Users); 2.3 Databases and Management; 2.4 Extensions and Contribs; 2.5 Backup; 2.6 Restore; 2.7 Managing Disk Space with Tablespaces; 2.8 Verboten; Chapter 3: psql; 3.1 Interactive psql; 3.2 Non-Interactive psql; 3.3 Session Configurations; 3.4 psql Gems; 3.5 Importing and Exporting Data; 3.6 Basic Reporting; Chapter 4: Using pgAdmin; 4.1 Getting Started; 4.2 pgAdmin Features; 4.3 pgScript; 4.4 Graphical Explain; 4.5 Job Scheduling with pgAgent; Chapter 5: Data Types; 5.1 Numeric Data Types; 5.2 Arrays; 5.3 Character Types; 5.4 Temporal Data Types; 5.5 XML; 5.6 Custom and Composite Data Types; Chapter 6: Of Tables, Constraints, and Indexes; 6.1 Tables; 6.2 Constraints; 6.3 Indexes; Chapter 7: SQL: The PostgreSQL Way; 7.1 SQL Views; 7.2 Window Functions; 7.3 Common Table Expressions; 7.4 Constructions Unique to PostgreSQL; Chapter 8: Writing Functions; 8.1 Anatomy of PostgreSQL Functions; 8.2 Writing Functions with SQL; 8.3 Writing PL/pgSQL Functions; 8.4 Writing PL/Python Functions; 8.5 Trigger Functions; 8.6 Aggregates; Chapter 9: Query Performance Tuning; 9.1 EXPLAIN and EXPLAIN ANALYZE; 9.2 Writing Better Queries; 9.3 Guiding the Query Planner; 9.4 Caching; Chapter 10: Replication and External Data; 10.1 Replication Overview; 10.2 Setting Up Replication; 10.3 Foreign Data Wrappers (FDW); Install, Hosting, and Command-Line Guides; Installation Guides and Distributions; Where to Host PostgreSQL; PostgreSQL Packaged Command-Line Tools;