PostgreSQL 8 for Windows / Edition 1

Paperback (Print)
Buy New
Buy New from
Used and New from Other Sellers
Used and New from Other Sellers
from $3.99
Usually ships in 1-2 business days
(Save 92%)
Other sellers (Paperback)
  • All (9) from $3.99   
  • New (5) from $34.43   
  • Used (4) from $3.99   


The easiest way to set up a PostgreSQL database server on Windows

Get up-and-running on PostgreSQL quickly using this hands-on guide. Filled with real-world examples, PostgreSQL 8 for Windows offers you practical, step-by-step details on installing, configuring, and using PostgreSQL 8--the full-featured, open-source database management system--on Windows platforms. You'll learn to administer, secure, and tune your database and use SQL. You'll also discover how to interface Microsoft Access, Microsoft .NET, Visual C++, and Java with the PostgreSQL database.

  • Install and configure PostgreSQL 8 on Windows
  • Customize your system using the configuration files
  • Work with the utilities
  • Administer your database from the pgAdmin III graphical interface
  • Use the psql command line program to manually execute SQL commands
  • Take advantage of built-in functions or create your own stored procedures and triggers
  • Implement tested security measures
  • Maintain optimal database performance
  • Access a PostgreSQL database from a Microsoft Access application and migrate Access databases to PostgreSQL
  • Create .NET, Visual C++, and Java applications that interface with your PostgreSQL server
Read More Show Less

Product Details

  • ISBN-13: 9780071485623
  • Publisher: McGraw-Hill Professional Publishing
  • Publication date: 3/22/2007
  • Series: Database Professional's Library
  • Edition description: 1ST
  • Edition number: 1
  • Pages: 400
  • Product dimensions: 7.30 (w) x 8.90 (h) x 0.81 (d)

Meet the Author

Richard Blum has worked for more than 18 years in the IT field as a network and systems administrator. During this time he has worked with database servers in UNIX, Linux, Novell, and Microsoft servers.

Read More Show Less

Table of Contents

Acknowledgments     xi
Introduction     xiii
Installation and Administration
What Is PostgreSQL?     3
The Open Source Movement     4
The History of PostgreSQL     5
Comparing PostgreSQL     8
PostgreSQL Versus Microsoft Access     8
PostgreSQL Versus Commercial DBMS Products     12
PostgreSQL Features     13
Transaction Support     13
ACID Compliant     14
Nested Transactions     18
Sub-selects     18
Views     18
Rules     20
Triggers     20
Support for Binary Large Objects (BLOBs)     20
User-Defined Types     21
Roles     21
Table Partitioning     22
Generalized Search Tree (GiST)     24
Summary     24
Installing PostgreSQL on Windows     25
System Requirements     26
Windows Workstations     26
Windows Servers     29
Downloading PostgreSQL     33
Installing PostgreSQL     35
Installation Options Window     36
Service Configuration Window     39
InitialiseDatabase Cluster Window     40
Enable Procedural Languages Window     42
Enable Contrib Modules Window     43
Finish the Install     44
Running PostgreSQL     46
Service Method     46
Manual Method     47
Summary     48
The PostgreSQL Files and Programs     49
The PostgreSQL Directory     50
Database Cluster Directory     50
Configuration Files     53
The postgresql.conf File     54
The pg_hba.conf File     70
The pg_ident.conf File     74
Programs     75
PostgreSQL Server Commands     75
SQL Wrapper Commands     78
PostgreSQL Applications     79
Summary     80
Managing PostgreSQL on Windows     81
The pgAdmin III Program     82
Parts of the PostgreSQL System     83
Tablespaces     85
Databases     86
Group Roles     88
Login Roles     89
Creating a New Application     89
Creating a New Database     89
Creating a New Schema     91
Creating the Tables      94
Entering and Viewing Data     101
The pgAdmin III Query Tool     104
Working with User Accounts     105
Creating Group Roles     106
Creating Login Roles     109
Testing Privileges     111
Database Maintenance     112
Backups and Restores     114
Performing a Backup     115
Restoring a Database     116
Summary     117
Using PostgreSQL in Windows
The psql Program     121
The psql Command-Line Format     122
Connection Options     122
Feature Options     123
Using the Command-Line Options     126
The psql Meta-commands     127
psql General Meta-commands     128
Query Buffer Meta-commands     131
Input/Output Meta-commands     132
Informational Meta-commands     133
Formatting Meta-commands     135
Copy and Large Object Meta-commands     136
The psqlrc.conf File     138
Importing Data with psql     139
Summary     140
Using Basic SQL     141
The SQL Query Language     142
SQL History      142
SQL Format     142
Creating Objects     146
Creating a Database     146
Creating a Schema     148
Creating a Table     149
Creating Group and Login Roles     154
Assigning Privileges     155
Handling Data     158
Inserting Data     158
Modifying Data     159
Deleting Data     161
Querying Data     162
The Basic Query Format     162
Writing Advanced Queries     164
Summary     167
Using Advanced SQL     169
Revisiting the Select Command     170
The Distinct Clause     171
The Select List     171
The From Clause     172
The Where Clause     174
The Group By Clause     174
The Having Clause     175
The Set Operation Clauses     175
The Order By Clause     176
The Limit Clause     176
The For Clause     177
Table Views     177
Table Indexes     179
Why Use Indexes?     180
Creating an Index     180
Determining the Index Method      183
Transactions     185
Basic Transactions     186
Advanced Transactions     187
Cursors     189
Creating a Cursor     189
Using a Cursor     190
Summary     194
PostgreSQL Functions     195
What Is a Function?     196
Operators     196
Built-in Functions     205
String Functions     206
Date and Time Functions     209
Math Functions     211
Aggregate Functions     211
Summary     214
Stored Procedures and Triggers     215
PostgreSQL Procedural Languages     216
Types of Functions     217
The PL/pgSQL Language     217
Creating a PL/pgSQL Function     218
Creating a Stored Procedure Using pgAdmin III     222
PL/pgSQL Function Code     225
Triggers     227
Trigger Function Format     228
Creating a Trigger Function     229
Testing the Trigger Function     232
Summary     232
Security     235
Controlling Network Users     236
Controlling Access via Firewalls     236
Controlling Access via Configuration Files     239
Testing Remote Connectivity     241
Encrypting Network Sessions     242
Enabling SSL in PostgreSQL     244
Encryption Keys and Certificates     244
Creating an SSL Encryption Key     245
Testing SSL Encryption     248
Monitoring Users     249
Summary     250
Performance     251
Enhancing Query Performance     252
The Explain Command     252
Using pgAdmin III to Evaluate Queries     255
The postgresql.conf Performance Parameters     257
Query Tuning     257
Resource Usage     259
Runtime Statistics     260
Summary     261
Windows Programming with PostgreSQL
Microsoft Access and PostgreSQL     265
Interfacing PostgreSQL with Access     266
Installing the ODBC Driver     266
Configuring a PostgreSQL ODBC Connection     269
Creating an Access Application Using PostgreSQL     275
Data Type Considerations     275
Designing an Application Database     276
Setting Up the ODBC Session      277
Creating the Access Application     278
Using PostgreSQL Views in Access     282
Sharing the Application     284
Exporting an Access Application to PostgreSQL     284
Summary     286
Microsoft .NET Framework     287
The Microsoft .NET Framework     288
Creating a .NET Development Environment     289
Downloading the .NET Packages     290
Installing the .NET Packages     290
Integrating the Npgsql Library     292
Downloading Npgsql     293
Installing the Npgsql Library     294
Creating .NET Applications with Npgsql     294
The Npgsql Library     295
The NpgsqlConnection Class     296
The NpgsqlCommand Class     300
The NpgsqlParameterCollection Class     309
Summary     311
Visual C++     313
The Visual C++ Programming Environment     314
Visual C++ Express Edition     314
Downloading and Installing Visual C++ Express Edition     315
Installing the Microsoft Platform SDK     319
The libpq Library     322
The libpq Functions     325
Opening and Closing Sessions      325
Executing SQL Commands     330
Using Parameters     338
Summary     342
Java     343
The Java Development Environment     344
Downloading the Java SDK     345
Installing the Java SDK     346
Building a Java Program Using NetBeans     348
PostgreSQL JDBC Driver     350
Using JDBC in a NetBeans Application     352
Using JDBC in a Java Command-Line Application     353
Java Database Connectivity     354
Starting a Connection     354
Sending SQL Commands     356
Using Parameters and Prepared Statements     362
Summary     365
Index     367
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)