Muutke küpsiste eelistusi

PostegreSQL: Up and Running, 3e: A Practical Guide to the Advanced Open Source Database [Pehme köide]

  • Formaat: Paperback / softback, 250 pages, kõrgus x laius x paksus: 250x150x15 mm, kaal: 666 g
  • Ilmumisaeg: 25-Oct-2017
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1491963417
  • ISBN-13: 9781491963418
Teised raamatud teemal:
  • Pehme köide
  • Hind: 43,68 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 51,39 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 250 pages, kõrgus x laius x paksus: 250x150x15 mm, kaal: 666 g
  • Ilmumisaeg: 25-Oct-2017
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1491963417
  • ISBN-13: 9781491963418
Teised raamatud teemal:

Thinking of migrating to PostgreSQL? This clear, fast-paced introduction helps you understand and use this open source database system. Not only will you learn about the enterprise class features in versions 9.5 to 10, you’ll also discover that PostgeSQL is more than a database system—it’s an impressive application platform as well.

With examples throughout, this book shows you how to achieve tasks that are difficult or impossible in other databases. This third edition covers new features, such as ANSI-SQL constructs found only in proprietary databases until now: foreign data wrapper (FDW) enhancements; new full text functions and operator syntax introduced in version 9.6; XML constructs new in version 10; query parallelization features introduced in 9.6 and enhanced in 10; built-in logical replication introduced in Version 10.e.

If you’re a current PostgreSQL user, you’ll pick up gems you may have missed before.

  • 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 use built-in replication to replicate data
Preface xi
1 The Basics 1(22)
Why PostgreSQL?
1(2)
Why Not PostgreSQL?
3(1)
Where to Get PostgreSQL
4(1)
Administration Tools
4(4)
psql
4(1)
pgAdmin
5(1)
phpPgAdmin
6(1)
Adminer
7(1)
PostgreSQL Database Objects
8(5)
What's New in Latest Versions of PostgreSQL?
13(6)
Why Upgrade?
13(1)
Features Introduced in PostgreSQL 10
13(2)
Features Introduced in PostgreSQL 9.6
15(1)
Features Introduced in PostgreSQL 9.5
16(1)
Features Introduced in PostgreSQL 9.4
17(2)
Database Drivers
19(1)
Where to Get Help
20(1)
Notable PostgreSQL Forks
20(3)
2 Database Administration 23(36)
Configuration Files
23(9)
Making Configurations Take Effect
24(1)
The postgresql.conf File
25(4)
The pg_hba.conf File
29(3)
Managing Connections
32(2)
Check for Queries Being Blocked
34(1)
Roles
34(4)
Creating Login Roles
34(1)
Creating Group Roles
35(3)
Database Creation
38(3)
Template Databases
38(1)
Using Schemas
39(2)
Privileges
41(4)
Types of Privileges
41(1)
Getting Started
42(1)
GRANT
42(1)
Default Privileges
43(1)
Privilege Idiosyncrasies
44(1)
Extensions
45(5)
Installing Extensions
46(2)
Common Extensions
48(2)
Backup and Restore
50(5)
Selective Backup Using pg_dump
51(2)
Systemwide Backup Using pg_dumpall
53(1)
Restoring Data
53(2)
Managing Disk Storage with Tablespaces
55(1)
Creating Tablespaces
55(1)
Moving Objects Among Tablespaces
56(1)
Verboten Practices
56(3)
Don't Delete PostgreSQL Core System Files and Binaries
56(1)
Don't Grant Full OS Administrative Privileges to the Postgres System Account (postgres)
57(1)
Don't Set shared_buffers Too High
58(1)
Don't Try to Start PostgreSQL on a Port Already in Use
58(1)
3 psql 59(16)
Environment Variables
59(1)
Interactive versus Noninteractive psql
60(1)
psql Customizations
61(4)
Custom Prompts
63(1)
Timing Executions
63(1)
Autocommit Commands
63(1)
Shortcuts
64(1)
Retrieving Prior Commands
64(1)
psql Gems
65(3)
Executing Shell Commands
65(1)
Watching Statements
65(1)
Retrieving Details of Database Objects
66(1)
Crosstabs
66(1)
Dynamic SQL Execution
67(1)
Importing and Exporting Data
68(3)
psql Import
68(2)
psql Export
70(1)
Copying from or to Program
70(1)
Basic Reporting
71(4)
4 Using pgAdmin 75(24)
Getting Started
76(3)
Overview of Features
76(1)
Connecting to a PostgreSQL Server
77(1)
Navigating pgAdmin
78(1)
pgAdmin Features
79(11)
Autogenerating Queries from Table Definitions
79(1)
Accessing psql from pgAdmin3
80(1)
Editing postgresql.conf and pg_hba.conf from pgAdmin3
81(1)
Creating Database Assets and Setting Privileges
81(3)
Import and Export
84(3)
Backup and Restore
87(3)
pgScript
90(2)
Graphical Explain
92(2)
Job Scheduling with pgAgent
94(5)
Installing pgAgent
94(1)
Scheduling Jobs
95(2)
Helpful pgAgent Queries
97(2)
5 Data Types 99(48)
Numerics
99(2)
Serials
100(1)
Generate Series Function
100(1)
Textuals
101(4)
String Functions
102(1)
Splitting Strings into Arrays, Tables, or Substrings
103(1)
Regular Expressions and Pattern Matching
103(2)
Temporals
105(6)
Time Zones: What They Are and Are Not
107(2)
Datetime Operators and Functions
109(2)
Arrays
111(5)
Array Constructors
111(2)
Unnesting Arrays to Rows
113(1)
Array Slicing and Splicing
114(1)
Referencing Elements in an Array
114(1)
Array Containment Checks
115(1)
Range Types
116(4)
Discrete Versus Continuous Ranges
116(1)
Built-in Range Types
117(1)
Defining Ranges
117(1)
Defining Tables with Ranges
118(1)
Range Operators
119(1)
JSON
120(7)
Inserting JSON Data
120(1)
Querying JSON
121(1)
Outputting JSON
122(1)
Binary JSON: jsonb
123(2)
Editing JSONB data
125(2)
XML
127(3)
Inserting XML Data
127(1)
Querying XML Data
128(2)
Full Text Search
130(12)
FTS Configurations
131(3)
TSVectors
134(2)
TSQueries
136(2)
Using Full Text Search
138(1)
Ranking Results
139(1)
Full Text Stripping
140(1)
Full Text Support for JSON and JSONB
141(1)
Custom and Composite Data Types
142(5)
All Tables Are Custom Data Types
142(1)
Building Custom Data Types
143(1)
Composites and NULLS
143(1)
Building Operators and Functions for Custom Types
144(3)
6 Tables, Constraints, and Indexes 147(18)
Tables
147(7)
Basic Table Creation
147(2)
Inherited Tables
149(1)
Partitioned Tables
150(2)
Unlogged Tables
152(1)
TYPE OF
153(1)
Constraints
154(3)
Foreign Key Constraints
154(1)
Unique Constraints
155(1)
Check Constraints
155(1)
Exclusion Constraints
156(1)
Indexes
157(8)
PostgreSQL Stock Indexes
157(3)
Operator Classes
160(1)
Functional Indexes
161(1)
Partial Indexes
162(1)
Multicolumn Indexes
163(2)
7 SQL: The PostgreSQL Way 165(34)
Views
165(6)
Single Table Views
166(1)
Using Triggers to Update Views
167(2)
Materialized Views
169(2)
Handy Constructions
171(13)
DISTINCT ON
171(1)
LIMIT and OFFSET
172(1)
Shorthand Casting
172(1)
Multirow Insert
173(1)
ILIKE for Case-Insensitive Search
173(1)
ANY Array Search
174(1)
Set-Returning Functions in SELECT
174(1)
Restricting DELETE, UPDATE, and SELECT from Inherited Tables
175(1)
DELETE USING
175(1)
Returning Affected Records to the User
176(1)
UPSERTs: INSERT ON CONFLICT UPDATE
176(1)
Composite Types in Queries
177(2)
Dollar Quoting
179(1)
DO
179(2)
FILTER Clause for Aggregates
181(1)
Percentiles and Mode
182(2)
Window Functions
184(4)
PARTITION BY
185(1)
ORDER BY
186(2)
Common Table Expressions
188(3)
Basic CTEs
188(1)
Writable CTEs
189(1)
Recursive CTE
190(1)
Lateral Joins
191(2)
WITH ORDINALITY
193(2)
GROUPING SETS, CUBE, ROLLUP
195(4)
8 Writing Functions 199(22)
Anatomy of PostgreSQL Functions
199(7)
Function Basics
200(3)
Triggers and Trigger Functions
203(1)
Aggregates
204(1)
Trusted and Untrusted Languages
205(1)
Writing Functions with SQL
206(4)
Basic SQL Function
206(2)
Writing SQL Aggregate Functions
208(2)
Writing PL/pgSQL Functions
210(1)
Basic PL/pgSQL Function
210(1)
Writing Trigger Functions in PL/pgSQL
210(1)
Writing PL/Python Functions
211(3)
Basic Python Function
212(2)
Writing PL/V8, PL/CoffeeScript, and PL/LiveScript Functions
214(7)
Basic Functions
215(2)
Writing Aggregate Functions with PL/V8
217(1)
Writing Window Functions in PL/V8
218(3)
9 Query Performance Tuning 221(24)
EXPLAIN
221(6)
EXPLAIN Options
221(1)
Sample Runs and Output
222(3)
Graphical Outputs
225(2)
Gathering Statistics on Statements
227(1)
Writing Better Queries
228(5)
Overusing Subqueries in SELECT
228(3)
Avoid SELECT*
231(1)
Make Good Use of CASE
232(1)
Using FILTER Instead of CASE
233(1)
Parallelized Queries
233(5)
What Does a Parallel Query Plan Look Like?
234(3)
Parallel Scans
237(1)
Parallel Joins
238(1)
Guiding the Query Planner
238(7)
Strategy Settings
238(1)
How Useful Is Your Index?
239(1)
Table Statistics
240(2)
Random Page Cost and Quality of Drives
242(1)
Caching
243(2)
10 Replication and External Data 245(20)
Replication Overview
245(4)
Replication Jargon
246(2)
Evolution of PostgreSQL Replication
248(1)
Third-Party Replication Options
248(1)
Setting Up Full Server Replication
249(5)
Configuring the Master
249(2)
Configuring the Slaves for Full Server Cluster Replication
251(1)
Initiating the Streaming Replication Process
252(1)
Replicating Only Some Tables or Databases with Logical Replication
252(2)
Foreign Data Wrappers
254(11)
Querying Flat Files
255(1)
Querying Flat Files as Jagged Arrays
256(1)
Querying Other PostgreSQL Servers
257(2)
Querying Other Tabular Formats with ogr_fdw
259(3)
Querying Nonconventional Data Sources
262(3)
A Installing PostgreSQL 265(6)
B PostgreSQL Packaged Command-Line Tools 271(10)
Index 281
Regina Obe is a co-principal of Paragon Corporation, a database consulting company based in Boston. She has over 15 years of professional experience in various programming languages and database systems, with special focus on spatial databases. She is a member of the PostGIS steering committee and the PostGIS core development team. Regina holds a BS degree in mechanical engineering from the Massachusetts Institute of Technology. She co-authored PostGIS in Action. Leo Hsu is a co-principal of Paragon Corporation, a database consulting company based in Boston. He has over 15 years of professional experience developing and thinking about databases for organizations large and small. Leo holds an MS degree in engineering of economic systems from Stanford University and BS degrees in mechanical engineering and economics from the Massachusetts Institute of Technology. He co-authored PostGIS in Action.