Amazon cover image
Image from Amazon.com

PostgreSQL server programming : extend PostgreSQL and integrate the database layer into your development framework / Hannu Krosing, Jim Mlodgenski, Kirk Roybal.

By: Contributor(s): Material type: TextTextSeries: Community experience distilledPublication details: Birmingham : Packt Pub., 2013.Description: 1 online resource (vi, 245 pages) : illustrations (some color)Content type:
  • text
Media type:
  • computer
Carrier type:
  • online resource
ISBN:
  • 9781849516990
  • 1849516995
  • 1849516987
  • 9781849516983
  • 9781680153606
  • 1680153609
Subject(s): Genre/Form: Additional physical formats: Print version:: PostgreSQL Server Programming.DDC classification:
  • 005.7585
LOC classification:
  • QA76.9.D3 K76 2013eb
Online resources:
Contents:
Cover; Copyright; Credits; About the Authors; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1:What Is a PostgreSQL Server?; Why program in the server?; Using PL/pgSQL for integrity checks; About this book's code examples; Switching to the expanded display; Moving beyond simple functions; Data comparisons using operators; Managing related data with triggers; Auditing changes; Data cleaning; Custom sort orders; Programming best practices; KISS -- keep it simple stupid; DRY -- don't repeat yourself; YAGNI -- you ain't gonna need it; SOA -- service-oriented architecture.
Type extensibilityOn caching; Wrap up -- why program in the server?; Performance; Ease of maintenance; Simple ways to tighten security; Summary; Chapter 2:Server Programming Environment; Cost of acquisition; Availability of developers; Licensing; Predictability; Community; Procedural languages; Platform compatibility; Application design; Databases are considered harmful; Encapsulation; What does PostgreSQL offer?; Data locality; More basics; Transactions; General error reporting and error handling; User-defined functions (UDF); Other parameters; More control; Summary.
Chapter 3:Your First PL/pgSQL FunctionWhy PL/pgSQL?; Structure of a PL/pgSQL function; Accessing function arguments; Conditional expressions; Loops with counters; Looping through query results; PERFORM versus SELECT; Returning a record; Acting on function results; Summary; Chapter 4:Returning Structured Data; Sets and arrays; Returning sets; Returning a set of integers; Using a set-returning function; Returning rows from a function; Functions based on views; OUT parameters and records; OUT parameters; Returning records; Using RETURNS TABLE; Returning with no predefined structure.
Returning SETOF ANYVariadic argument lists; Summary of RETURN SETOF variants; Returning cursors; Iterating over cursors returned from another function; Wrap up of functions returning a cursor(s); Other ways to work with structured data; Complex data types for modern world -- XML and JSON; XML data type and returning data as XML from functions; Returning data in the JSON format; Summary; Chapter 5:PL/pgSQL Trigger Functions; Creating the trigger function; Creating the trigger; Simple ""Hey, I'm called"" trigger; The audit trigger; Disallowing DELETE; Disallowing TRUNCATE.
Modifying the NEW recordTimestamping trigger; Immutable fields trigger; Controlling when a trigger is called; Conditional trigger; Trigger on specific field changes; Visibility; And most importantly -- use triggers cautiously!; Variables passed to the PL/pgSQL TRIGGER function; Summary; Chapter 6:Debugging PL/pgSQL; ''Manual'' debugging with RAISE NOTICE; Throwing exceptions; Logging to a file; Advantages of RAISE NOTICE; Disadvantages of RAISE NOTICE; Visual debugging; Getting the debugger installed; Installing pgAdmin3; Using the debugger; Advantages of the debugger.
Summary: 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. ""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.
Item type:
Tags from this library: No tags from this library for this title. Log in to add tags.
Star ratings
    Average rating: 0.0 (0 votes)
Holdings
Item type Home library Collection Call number Materials specified Status Date due Barcode
Electronic-Books Electronic-Books OPJGU Sonepat- Campus E-Books EBSCO Available

Includes index.

Cover; Copyright; Credits; About the Authors; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1:What Is a PostgreSQL Server?; Why program in the server?; Using PL/pgSQL for integrity checks; About this book's code examples; Switching to the expanded display; Moving beyond simple functions; Data comparisons using operators; Managing related data with triggers; Auditing changes; Data cleaning; Custom sort orders; Programming best practices; KISS -- keep it simple stupid; DRY -- don't repeat yourself; YAGNI -- you ain't gonna need it; SOA -- service-oriented architecture.

Type extensibilityOn caching; Wrap up -- why program in the server?; Performance; Ease of maintenance; Simple ways to tighten security; Summary; Chapter 2:Server Programming Environment; Cost of acquisition; Availability of developers; Licensing; Predictability; Community; Procedural languages; Platform compatibility; Application design; Databases are considered harmful; Encapsulation; What does PostgreSQL offer?; Data locality; More basics; Transactions; General error reporting and error handling; User-defined functions (UDF); Other parameters; More control; Summary.

Chapter 3:Your First PL/pgSQL FunctionWhy PL/pgSQL?; Structure of a PL/pgSQL function; Accessing function arguments; Conditional expressions; Loops with counters; Looping through query results; PERFORM versus SELECT; Returning a record; Acting on function results; Summary; Chapter 4:Returning Structured Data; Sets and arrays; Returning sets; Returning a set of integers; Using a set-returning function; Returning rows from a function; Functions based on views; OUT parameters and records; OUT parameters; Returning records; Using RETURNS TABLE; Returning with no predefined structure.

Returning SETOF ANYVariadic argument lists; Summary of RETURN SETOF variants; Returning cursors; Iterating over cursors returned from another function; Wrap up of functions returning a cursor(s); Other ways to work with structured data; Complex data types for modern world -- XML and JSON; XML data type and returning data as XML from functions; Returning data in the JSON format; Summary; Chapter 5:PL/pgSQL Trigger Functions; Creating the trigger function; Creating the trigger; Simple ""Hey, I'm called"" trigger; The audit trigger; Disallowing DELETE; Disallowing TRUNCATE.

Modifying the NEW recordTimestamping trigger; Immutable fields trigger; Controlling when a trigger is called; Conditional trigger; Trigger on specific field changes; Visibility; And most importantly -- use triggers cautiously!; Variables passed to the PL/pgSQL TRIGGER function; Summary; Chapter 6:Debugging PL/pgSQL; ''Manual'' debugging with RAISE NOTICE; Throwing exceptions; Logging to a file; Advantages of RAISE NOTICE; Disadvantages of RAISE NOTICE; Visual debugging; Getting the debugger installed; Installing pgAdmin3; Using the debugger; Advantages of the debugger.

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. ""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.

Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK). WlAbNL

Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force. WlAbNL

eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - Worldwide

There are no comments on this title.

to post a comment.

O.P. Jindal Global University, Sonepat-Narela Road, Sonepat, Haryana (India) - 131001

Send your feedback to glus@jgu.edu.in

Hosted, Implemented & Customized by: BestBookBuddies   |   Maintained by: Global Library