
Chapter 10: JSON Support 22 .....................................................................................................................................
Section 10.1: Using JSONb operators 22 ........................................................................................................................
Section 10.2: Querying complex JSON documents 26 ..................................................................................................
Section 10.3: Creating a pure JSON table 27 .................................................................................................................
Chapter 11: Aggregate Functions 28 ........................................................................................................................
Section 11.1: Simple statistics: min(), max(), avg() 28 .....................................................................................................
Section 11.2: regr_slope(Y, X) : slope of the least-squares-fit linear equation determined by the (X, Y) pairs
28 ................................................................................................................................................................................
Section 11.3: string_agg(expression, delimiter) 29 ........................................................................................................
Chapter 12: Common Table Expressions (WITH) 31 .........................................................................................
Section 12.1: Common Table Expressions in SELECT Queries 31 .................................................................................
Section 12.2: Traversing tree using WITH RECURSIVE 31 ............................................................................................
Chapter 13: Window Functions 32 .............................................................................................................................
Section 13.1: generic example 32 .....................................................................................................................................
Section 13.2: column values vs dense_rank vs rank vs row_number 33 ...................................................................
Chapter 14: Recursive queries 34 .............................................................................................................................
Section 14.1: Sum of Integers 34 ......................................................................................................................................
Chapter 15: Programming with PL/pgSQL 35 ....................................................................................................
Section 15.1: Basic PL/pgSQL Function 35 ......................................................................................................................
Section 15.2: custom exceptions 35 ................................................................................................................................
Section 15.3: PL/pgSQL Syntax 36 ..................................................................................................................................
Section 15.4: RETURNS Block 36 .....................................................................................................................................
Chapter 16: Inheritance 37 ............................................................................................................................................
Section 16.1: Creating children tables 37 ........................................................................................................................
Chapter 17: Export PostgreSQL database table header and data to CSV file 38 ...........................
Section 17.1: copy from query 38 ....................................................................................................................................
Section 17.2: Export PostgreSQL table to csv with header for some column(s) 38 ...................................................
Section 17.3: Full table backup to csv with header 38 ...................................................................................................
Chapter 18: Triggers and Trigger Functions 39 .................................................................................................
Section 18.1: Type of triggers 39 ......................................................................................................................................
Section 18.2: Basic PL/pgSQL Trigger Function 40 .......................................................................................................
Chapter 19: Event Triggers 42 ....................................................................................................................................
Section 19.1: Logging DDL Command Start Events 42 ..................................................................................................
Chapter 20: Role Management 43 ...........................................................................................................................
Section 20.1: Create a user with a password 43 ............................................................................................................
Section 20.2: Grant and Revoke Privileges 43 ...............................................................................................................
Section 20.3: Create Role and matching database 44 .................................................................................................
Section 20.4: Alter default search_path of user 44 ......................................................................................................
Section 20.5: Create Read Only User 45 ........................................................................................................................
Section 20.6: Grant access privileges on objects created in the future 45 ................................................................
Chapter 21: Postgres cryptographic functions 46 ............................................................................................
Section 21.1: digest 46 .......................................................................................................................................................
Chapter 22: Comments in PostgreSQL 47 ............................................................................................................
Section 22.1: COMMENT on Table 47 ..............................................................................................................................
Section 22.2: Remove Comment 47 ...............................................................................................................................
Chapter 23: Backup and Restore 48 ........................................................................................................................
Section 23.1: Backing up one database 48 ....................................................................................................................
Section 23.2: Restoring backups 48 ................................................................................................................................
相关文档
评论