SlideShare a Scribd company logo
Visit https://ebookultra.com to download the full version and
explore more ebooks
PostgreSQL Server Programming 2nd Edition Usama
Dar
_____ Click the link below to download _____
https://ebookultra.com/download/postgresql-server-
programming-2nd-edition-usama-dar/
Explore and download more ebooks at ebookultra.com
Here are some suggested products you might be interested in.
Click the link to download
PostgreSQL 2nd Edition Korry Douglas
https://ebookultra.com/download/postgresql-2nd-edition-korry-douglas/
Professional SQL Server 2005 Programming Robert Vieira
https://ebookultra.com/download/professional-sql-
server-2005-programming-robert-vieira/
Beginning Databases with PostgreSQL From Novice to
Professional 2nd Edition Matthew
https://ebookultra.com/download/beginning-databases-with-postgresql-
from-novice-to-professional-2nd-edition-matthew/
PostgreSQL Cookbook 1st Edition Chitij Chauhan
https://ebookultra.com/download/postgresql-cookbook-1st-edition-
chitij-chauhan/
Learning PostgreSQL Create develop and manage relational
databases in real world applications using PostgreSQL 1st
Edition Juba
https://ebookultra.com/download/learning-postgresql-create-develop-
and-manage-relational-databases-in-real-world-applications-using-
postgresql-1st-edition-juba/
Programming Microsoft SQL Server 2000 with Microsoft
Visual Basic NET 1st edition Edition Rick Dobson
https://ebookultra.com/download/programming-microsoft-sql-
server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick-
dobson/
Building Bluetooth Low Energy Systems 1st Edition Muhammad
Usama Bin Aftab
https://ebookultra.com/download/building-bluetooth-low-energy-
systems-1st-edition-muhammad-usama-bin-aftab/
Computer Networks An Open Source Approach 1st Edition
Ying-Dar Lin
https://ebookultra.com/download/computer-networks-an-open-source-
approach-1st-edition-ying-dar-lin/
Server study guide 2nd ed Edition Brad Hryhoruk
https://ebookultra.com/download/server-study-guide-2nd-ed-edition-
brad-hryhoruk/
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming 2nd Edition Usama
Dar Digital Instant Download
Author(s): Usama Dar, Hannu Krosing, JimMlodgenski, Kirk Roybal
ISBN(s): 9781783980581, 1783980583
Edition: 2
File Details: PDF, 2.28 MB
Year: 2015
Language: english
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming Second
Edition
Table of Contents
PostgreSQL Server Programming Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
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 extensibility
Caching
Wrapping up – why program in the server?
Performance
Ease of maintenance
Improved productivity
Simple ways to tighten security
Summary
2. Server Programming Environments
Cost of acquisition
Availability of developers
Licensing
Predictability
Community
Procedural languages
Third-party tools
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
Other parameters
More control
Summary
3. Your First PL/pgSQL Function
Why PL/pgSQL?
The structure of a PL/pgSQL function
Accessing function arguments
Conditional expressions
Loops with counters
Statement termination
Looping through query results
PERFORM versus SELECT
Looping Through Arrays
Returning a record
Acting on the function’s results
Summary
4. Returning Structured Data
Sets and arrays
Returning sets
Returning a set of integers
Using a set returning function
Functions based on views
OUT parameters and records
OUT parameters
Returning records
Using RETURNS TABLE
Returning with no predefined structure
Returning SETOF ANY
Variadic argument lists
A summary of the RETURN SETOF variants
Returning cursors
Iterating over cursors returned from another function
Wrapping up of functions returning cursors
Other ways to work with structured data
Complex data types for the modern world – XML and JSON
XML data type and returning data as XML from functions
Returning data in the JSON format
Summary
5. PL/pgSQL Trigger Functions
Creating the trigger function
Creating the trigger
Working on a simple “Hey, I’m called” trigger
The audit trigger
Disallowing DELETE
Disallowing TRUNCATE
Modifying the NEW record
The timestamping trigger
The immutable fields trigger
Controlling when a trigger is called
Conditional triggers
Triggers on specific field changes
Visibility
Most importantly – use triggers cautiously!
Variables passed to the PL/pgSQL TRIGGER function
Summary
6. PostgreSQL Event Triggers
Use cases for creating event triggers
Creating event triggers
Creating an audit trail
Preventing schema changes
A roadmap of event triggers
Summary
7. Debugging PL/pgSQL
Manual debugging with RAISE NOTICE
Throwing exceptions
Logging to a file
The advantages of RAISE NOTICE
The disadvantages of RAISE NOTICE
Visual debugging
Installing the debugger
Installing the debugger from the source
Installing pgAdmin3
Using the debugger
The advantages of the debugger
The disadvantages of the debugger
Summary
8. Using Unrestricted Languages
Are untrusted languages inferior to trusted ones?
Can you use untrusted languages for important functions?
Will untrusted languages corrupt the database?
Why untrusted?
Why PL/Python?
Quick introduction to PL/Python
A minimal PL/Python function
Data type conversions
Writing simple functions in PL/Python
A simple function
Functions returning a record
Table functions
Running queries in the database
Running simple queries
Using prepared queries
Caching prepared queries
Writing trigger functions in PL/Python
Exploring the inputs of a trigger
A log trigger
Constructing queries
Handling exceptions
Atomicity in Python
Debugging PL/Python
Using plpy.notice() to track the function’s progress
Using assert
Redirecting sys.stdout and sys.stderr
Thinking out of the “SQL database server” box
Generating thumbnails when saving images
Sending an e-mail
Listing directory contents
Summary
9. Writing Advanced Functions in C
The simplest C function – return (a + b)
add_func.c
Version 0 call conventions
Makefile
CREATE FUNCTION add(int, int)
add_func.sql.in
Summary for writing a C function
Adding functionality to add(int, int)
Smart handling of NULL arguments
Working with any number of arguments
Basic guidelines for writing C code
Memory allocation
Use palloc() and pfree()
Zero-fill the structures
Include files
Public symbol names
Error reporting from C functions
“Error” states that are not errors
When are messages sent to the client?
Running queries and calling PostgreSQL functions
A sample C function using SPI
Visibility of data changes
More info on SPI_* functions
Handling records as arguments or returned values
Returning a single tuple of a complex type
Extracting fields from an argument tuple
Constructing a return tuple
Interlude – what is Datum?
Returning a set of records
Fast capturing of database changes
Doing something at commit/rollback
Synchronizing between backends
Writing functions in C++
Additional resources for C
Summary
10. Scaling Your Database with PL/Proxy
Creating a simple single-server chat
Dealing with success – splitting tables over multiple databases
What expansion plans work and when?
Moving to a bigger server
Master-slave replication – moving reads to slave
Multimaster replication
Data partitioning across multiple servers
Splitting the data
PL/Proxy – the partitioning language
Installing PL/Proxy
The PL/Proxy language syntax
CONNECT, CLUSTER, and RUN ON
SELECT and TARGET
SPLIT – distributing array elements over several partitions
The distribution of data
Configuring the PL/Proxy cluster using functions
Configuring the PL/Proxy cluster using SQL/MED
Moving data from the single to the partitioned database
Connection Pooling
Summary
11. PL/Perl – Perl Procedural Language
When to use PL/Perl
Installing PL/Perl
A simple PL/Perl function
Passing and returning non-scalar types
Writing PL/Perl triggers
Untrusted Perl
Summary
12. PL/Tcl – Tcl Procedural Language
Installing PL/Tcl
A simple PL/Tcl function
Null checking with Strict functions
The parameter format
Passing and returning arrays
Passing composite-type arguments
Accessing databases
Writing PL/Tcl triggers
Untrusted Tcl
Summary
13. Publishing Your Code as PostgreSQL Extensions
When to create an extension
Unpackaged extensions
Extension versions
The .control file
Building an extension
Installing an extension
Viewing extensions
Publishing your extension
Introduction to PostgreSQL Extension Network
Signing up to publish your extension
Creating an extension project the easy way
Providing the metadata about the extension
Writing your extension code
Creating the package
Submitting the package to PGXN
Installing an extension from PGXN
Summary
14. PostgreSQL as an Extensible RDBMS
What can’t be extended?
Creating a new operator
Overloading an operator
Optimizing operators
COMMUTATOR
NEGATOR
Creating index access methods
Creating user-defined aggregates
Using foreign data wrappers
Summary
Index
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming Second
Edition
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming Second
Edition
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2013
Second edition: February 2015
Production reference: 1210215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-058-1
www.packtpub.com
PostgreSQL Server Programming 2nd Edition Usama Dar
Credits
Authors
Usama Dar
Hannu Krosing
Jim Mlodgenski
Kirk Roybal
Reviewers
Stephen Frost
Rick van Hattem
Vibhor Kumar
Jeff Lawson
Mariano Reingart
Julien Tachoires
Commissioning Editor
Usha Iyer
Acquisition Editors
Antony Lowe
Meeta Rajani
Sam Wood
Content Development Editor
Adrian Raposo
Technical Editors
Mrunmayee Patil
Chinmay Puranik
Copy Editors
Dipti Kapadia
Aarti Saldanha
Project Coordinator
Kinjal Bari
Proofreaders
Maria Gould
Linda Morris
Indexer
Monica Ajmera Mehta
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur
PostgreSQL Server Programming 2nd Edition Usama Dar
About the Authors
Usama Dar is a seasoned software developer and architect. During his 14 years’ career, he
has worked extensively with PostgreSQL and other database technologies. He worked on
PostgreSQL internals extensively while he was working for EnterpriseDB. Currently, he
lives in Munich where he works for Huawei’s European Research Center. He designs the
next generation of high-performance database systems based on open source technologies,
such as PostgreSQL, which are used under high workloads and strict performance
requirements.
Hannu Krosing was a PostgreSQL user before it was rewritten to use SQL as its main
query language in 1995. Therefore, he has both the historic perspective of its
development, as well as almost 20 years of experience in using it to solve various real-life
problems.
He was the first database administrator and database architect at Skype, where he invented
the sharding language PL/Proxy that allows you to scale the user database in order to work
with billions of users.
After he left Skype at the end of 2006—about a year after it was bought by eBay—he has
been working as a PostgreSQL consultant with 2ndQuadrant, the premier PostgreSQL
consultancy with a global reach and local presence in most parts of the world.
He has coauthored PostgreSQL 9 Administration Cookbook, Packt Publishing, together
with one of the main PostgreSQL developers, Simon Riggs.
I want to sincerely thank my wife, Evelyn, for her support while writing this book.
Jim Mlodgenski is the CTO of OpenSCG, a professional services company focused on
leveraging open source technologies for strategic advantage. He was formerly the CEO of
StormDB, a database cloud company focused on horizontal scalability. Prior to StormDB,
he has held highly technical roles at Cirrus Technology, Inc., EnterpriseDB, and Fusion
Technologies.
Jim is also a fervent advocate of PostgreSQL. He is on the board of the United States
PostgreSQL Association as well as a part of the organizing teams of the New York
PostgreSQL User Group and Philadelphia PostgreSQL User Group.
Kirk Roybal has been an active member of the PostgreSQL community since 1998. He
has helped organize user groups in Houston, Dallas, and Bloomington, IL. He has
mentored many junior database administrators and provided cross-training to senior
database engineers. He has provided solutions using PostgreSQL for reporting, business
intelligence, data warehousing, applications, and development support.
He saw the scope of PostgreSQL when his first small-scale business customer asked for a
web application. At that time, competitive database products were either extremely
immature or cost prohibitive.
Kirk has stood by his choice of PostgreSQL for many years now. His expertise is founded
on keeping up with features and capabilities as they become available.
Writing a book has been a unique experience for me. Many people fantasize about it, few
start one, and even fewer get to publication. I am proud to be part of a team that actually
made it to the book shelf (which itself is a diminishing breed). Thanks to Sarah Cullington
from Packt Publishing for giving me a chance to participate in the project. I believe that
the PostgreSQL community will be better served by this information, and I hope that they
receive this as a reward for the time that they have invested in me over the years.
A book only has the value that the readers give it. Thank you to the PostgreSQL
community for all the technical, personal, and professional development help you have
provided. The PostgreSQL community is a great bunch of people, and I have enjoyed the
company of many of them. I hope to contribute more to this project in the future, and I
hope you find my contributions as valuable as I find yours.
Thank you to my family for giving me a reason to succeed and for listening to the
gobbledygook and nodding appreciatively.
Have you ever had your family ask you what you were doing and answered them with a
function? Try it. No, then again, don’t try it. They may just have you involuntarily
checked in somewhere.
PostgreSQL Server Programming 2nd Edition Usama Dar
About the Reviewers
Stephen Frost is a major contributor and committer to PostgreSQL, who has been
involved with PostgreSQL since 2002, and has developed features such as the role system
and column-level privileges.
He is the chief technology officer at Crunchy Data Solutions, Inc., the PostgreSQL
company for Secure Enterprises. He is involved in the advancement of PostgreSQL’s
capabilities, particularly in the area of security in order to support the needs of government
and financial institutions who have strict security and regulatory requirements.
Rick van Hattem is an entrepreneur with a computer science background and a long-time
open source developer with vast experience in the C, C++, Python, and Java languages.
Additionally, he has worked with most large database servers such as Oracle, MS SQL,
and MySQL, but he has been focusing on PostgreSQL since Version 7.4.
He is one of the founders of the Fashiolista.com social network, and until recently, he was
the CTO. Here, he used PostgreSQL to scale the feeds for millions of users to show that
PostgreSQL can hold up to NoSQL solutions, given some tuning and additional tools.
After Fashiolista, he worked as a freelance consultant for several companies, including
2ndQuadrant.
He is currently the founder of PGMon.com, a monitoring service that analyzes your
databases, indexes, and queries to keep them running at peak performance. In addition to
analyzing your database settings, the system actively monitors your queries and gives you
recommendations to enhance performance.
He is also the creator and maintainer of a large number of open source projects, such as
pg_query_analyser, pg_cascade_timestamp, QtQuery, Python-Statsd, and Django-Statsd.
Vibhor Kumar is a principal system architect at EnterpriseDB who specializes in
assisting Fortune 100 companies to deploy, manage, and optimize Postgres databases. He
joined EnterpriseDB in 2008 to work with Postgres after several years of working with
Oracle systems. He has worked in team leadership roles at IBM Global Services and BMC
Software as well as an Oracle database administrator at CMC Ltd. for several years. He
has developed expertise in Oracle, DB2, and MongoDB and holds certifications in them.
He has experience working with MS SQL Server, MySQL, and data warehousing. He
holds a bachelor’s degree in computer science from the University of Lucknow and a
master’s degree in computer science from the Army Institute of Management, Kolkata. He
is a certified PostgreSQL trainer and holds a professional certification in Postgres Plus
Advanced Server from EnterpriseDB.
Jeff Lawson has been a fan and user of PostgreSQL since the time he discovered it in
2001. Over the years, he has also developed and deployed applications for IBM DB2,
Oracle, MySQL, Microsoft SQL Server, Sybase, and others, but he always prefers
PostgreSQL for its balance of features and openness. Much of his experience involves
developing for Internet-facing websites/projects that require highly scalable databases
with high availability or with provisions for disaster recovery.
He currently works as the director of software development for FlightAware, which is an
airplane-tracking website that uses PostgreSQL and other open source software to store
and analyze the positions of the thousands of flights that are operated worldwide every
day. He has extensive experience in software architecture, data security, and network
protocol design from the software engineering positions he has held at Univa / United
Devices, Microsoft, NASA’s Jet Propulsion Laboratory, and WolfeTech. He is a founder of
distributed.net, which pioneered distributed computing in the 1990s, and he continues to
serve as the chief of operations and as a member of the board there. He earned a BSc
degree in computer science from Harvey Mudd College.
He is fond of cattle, holds an FAA private pilot certificate, and owns an airplane based in
Houston, Texas.
Mariano Reingart lives in Buenos Aires, Argentina, and is a specialist in the software
development of applications and libraries (web services, PDF, GUI, replication, and so on)
with more than 10 years of experience. Currently, he is the PostgreSQL regional contact
for Argentina and a Python Software Foundation member.
He is a major contributor to the web2py Python web framework, and now he’s working on
the wxWidgets multiplatform GUI toolkit (specifically in the Qt port and Android mobile
areas). Also, he has contributed to more than a dozen open source projects, including an
interface for Free Electronic Invoice web services (PyAfipWs) and Pythonic replication
for PostgreSQL (PyReplica).
He has a bachelor’s degree in computer systems analysis, and currently, he’s a master’s
candidate for the MSc in free software degree at the Open University of Catalonia.
He works on his own funded entrepreneurial venture formed by an open group of
independent professionals, dedicated to software development, training, and technical
support, focusing on open source tools (GNU/Linux, Python, PostgreSQL, and
web2py/wxPython).
He has worked for local Python-based companies in large business applications (ERP,
SCM, and CRM) and mission critical systems (election counting, electronic voting, and
911 emergency events support). He has contributed to books such as web2py Enterprise
Web Framework, Third Edition, and web2py Application Development Cookbook, Packt
Publishing, and several Spanish translations of the PostgreSQL official documentation.
His full resume is available at http://reingart.blogspot.com/p/resume.html.
Julien Tachoires is a PostgreSQL specialist, who works as consultant for the French
PostgreSQL company Dalibo. He is the main developer of pg_activity, a top-end software
dedicated to follow the PostgreSQL incoming traffic in real time, which is written in
Python.
I want to thank my employer Dalibo; my wife, Camille; and my son, Arthur.
PostgreSQL Server Programming 2nd Edition Usama Dar
www.PacktPub.com
Support files, eBooks, discount offers, and
more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as
a print book customer, you are entitled to a discount on the eBook copy. Get in touch with
us at <service@packtpub.com> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital
book library. Here, you can search, access, and read Packt’s entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
PostgreSQL Server Programming 2nd Edition Usama Dar
Preface
This fascinating guide to server programming will take your skills of PostgreSQL to a
whole new level. A step-by-step approach with illuminating examples will educate you
about the full range of possibilities. You will understand the extension framework of
PostgreSQL and leverage it in ways you haven’t even invented yet. You will learn how to
write functions and create your own data types, all in your favorite programming
language. It is a step-by-step tutorial, with plenty of tips and tricks to kick-start server
programming.
What this book covers
Chapter 1, What Is a PostgreSQL Server?, introduces you to the PostgreSQL server and
will set the tone for the rest of the book. It introduces you to the ways in which a
PostgreSQL server is extendible, and shows you that it can be treated as a complete
software development framework instead of just a database server.
Chapter 2, Server Programming Environments, elaborates that PostgreSQL is built to
handle user needs, but more importantly, it is built not to change underneath users in the
future. It will touch upon the environments and will highlight some of the important things
to be kept in mind when programming on the server in PostgreSQL.
Chapter 3, Your First PL/pgSQL Function, builds the foundations by demonstrating how
to write simple PL/pgSQL functions.
Chapter 4, Returning Structured Data, builds on the knowledge of writing PL/pgSQL
functions and demonstrates how to write functions that return a set of values such as rows,
arrays, and cursors.
Chapter 5, PL/pgSQL Trigger Functions, discusses how to write PL/pgSQL functions that
are used to write trigger logic. It also discusses the various types of triggers available in
PostgreSQL and the options that a database developer has when writing such functions.
Chapter 6, PostgreSQL Event Triggers, discusses PostgreSQL’s event trigger functionality.
Event triggers are fired when running a DDL operation on a table. This chapter discusses
the various possibilities and options of creating event triggers and their limitations in
PostgreSQL.
Chapter 7, Debugging PL/pgSQL, elaborates on how to debug PL/pgSQL’s stored
procedures and functions in PostgreSQL. This chapter explains how to install the
debugger plugin and use the pgAdmin debugger console.
Chapter 8, Using Unrestricted Languages, explains the differences between restricted and
unrestricted PostgreSQL languages. This chapter uses PL/Python as an example and
demonstrates the examples of both restricted and unrestricted functions in PL/Python.
Chapter 9, Writing Advanced Functions in C, explains how to extend PostgreSQL by
writing user-defined functions (UDFs) in C.
Chapter 10, Scaling Your Database with PL/Proxy, explains the use of a special
programming language in PostgreSQL called PL/Proxy and how to use it in order to
partition and shard your database.
Chapter 11, PL/Perl – Perl Procedural Language, discusses a popular PL language in
PostgreSQL called PL/Perl. This chapter uses some simple examples to demonstrate how
you can use Perl to write database functions.
Chapter 12, PL/Tcl – Tcl Procedural Language, discusses Tcl as a language of choice
when writing database functions. It discusses the pros and cons of using Tcl in the
database.
Chapter 13, Publishing Your Code as PostgreSQL Extensions, discusses how to package
and distribute the PostgreSQL extensions. Well-packaged extensions can be easily
distributed and installed by other users. This chapter also introduces you to the
PostgreSQL Extension Network (PGXN) and shows you how to use it to get the
extensions published by other developers.
Chapter 14, PostgreSQL as an Extensible RDBMS, discusses more extensibility options in
PostgreSQL, such as creating new data types, operators, and index methods.
PostgreSQL Server Programming 2nd Edition Usama Dar
What you need for this book
In order to follow this book, you need the following software:
PostgreSQL Database Server 9.4
Linux/Unix Operating System
Python 2, Perl, and Tcl
PostgreSQL Server Programming 2nd Edition Usama Dar
Who this book is for
This book is for moderate to advanced level PostgreSQL database professionals. To get a
better understanding of this book, you should have a general experience in writing SQL, a
basic idea of query tuning, and some coding experience in a language of your choice.
PostgreSQL Server Programming 2nd Edition Usama Dar
Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their
meaning.
Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows: “If any
of the checks fail, you should do ROLLBACK instead of COMMIT.”
A block of code is set as follows:
CREATE TABLE accounts(owner text, balance numeric, amount numeric);
INSERT INTO accounts VALUES ('Bob',100);
INSERT INTO accounts VALUES ('Mary',200);
When we wish to draw your attention to a particular part of a code block, the relevant
lines or items are set in bold:
CREATE OR REPLACE FUNCTION fibonacci_seq(num integer)
RETURNS SETOF integer AS $$
DECLARE
a int := 0;
b int := 1;
BEGIN
IF (num <= 0)
THEN RETURN;
END IF;
RETURN NEXT a;
LOOP
EXIT WHEN num <= 1;
RETURN NEXT b;
num = num - 1;
SELECT b, a + b INTO a, b;
END LOOP;
END;
$$ LANGUAGE plpgsql;
Any command-line input or output is written as follows:
$ psql -c "SELECT 1 AS test"
New terms and important words are shown in bold. Words that you see on the screen,
for example, in menus or dialog boxes, appear in the text like this: “Enter some values into
the columns, as seen in the preceding screenshot, and click on the Debug button.”
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
PostgreSQL Server Programming 2nd Edition Usama Dar
PostgreSQL Server Programming 2nd Edition Usama Dar
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or disliked. Reader feedback is important for us as it helps us
develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <feedback@packtpub.com>, and mention the
book’s title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.
PostgreSQL Server Programming 2nd Edition Usama Dar
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help
you to get the most from your purchase.
Another Random Scribd Document
with Unrelated Content
Hectors, street bullies. Since the Restoration, we have had a
succession of street brawlers, as the Muns, the Tityre Tus, the
Hectors, the Scourers, the Nickers, the Hawcabites, and, lastly, the
Mohawks, worst of them all.
Heeltap (Crispin), a cobbler, and one of the corporation of
Garratt, of which Jerry Sneak is chosen mayor,—S. Foote, The Mayor
of Garratt (1763).
Heep (Uriah), a detestable sneak, who is everlastingly forcing on
one’s attention that he is so ’umble. Uriah is Mr. Wickfield’s clerk,
and, with all his ostentatious ’umility, is most designing, malignant,
and intermeddling. His infamy is dragged to light by Mr. Micawber.
Herr Piper, “representative in New Swedeland of the Great
Gustavus, the bulwark of the Protestant Religion,” and a mighty
stickler for forms and ceremonies appertaining to the office.—James
Kirke Paulding, Königsmarke (1823).
Heidelberg (Mrs.), the widow of a wealthy Dutch merchant, who
kept her brother’s house (Mr. Sterling, a city merchant). She was
very vulgar, and “knowing the strength of her purse, domineered on
the credit of it.” Mrs. Heidelberg had most exalted notions “of the
quality,” and a “perfect contempt for everything that did not smack
of high life.” Her English was certainly faulty, as the following
specimens will show:—farden, wolgar, spurrit, pertest, Swish, kivers,
purliteness, etc. She spoke of a pictur by Raphael-Angelo, a po-shay,
dish-abille, parfect naturals [idiots], most genteelest, and so on.
When thwarted in her overbearing ways, she threatened to leave the
house and go to Holland to live with her husband’s cousin, Mr.
Vanderspracken.—Colman and Garrick, The Clandestine Marriage
(1766).
Heimdall (2 syl.), in Celtic mythology, was the son of nine virgin
sisters. He dwelt in the celestial Fort Himinsbiorg, under the
extremity of the rainbow. His ear was so acute that he could hear
“the wool grow on the sheep’s back, and the grass in the meadows.”
Heimdall was the watch or sentinel of Asgard (Olympus), and even
in his sleep was able to see everything that happened (See Fine-ear).
Heimdall’s Horn. At the end of the world, Heimdall will wake the
gods with his horn, when they will be attacked by Muspell, Loki, the
wolf Fenris, and the serpent Jormunsgandar.
And much he talked of...
And Heimdal’s horn and the day of doom.
Longfellow, The Wayside Inn (interlude, 1631).
Heinrich (Poor), or “Poor Henry,” the hero and title of a poem by
Hartmann von der Aue [Our]. Heinrich was a rich nobleman, struck
with leprosy, and was told he would never recover till some virgin of
spotless purity volunteered to die on his behalf. As Heinrich neither
hoped nor even wished for such a sacrifice, he gave the main part of
his possessions to the poor, and went to live with a poor tenant
farmer, who was one of his vassals. The daughter of this farmer
heard by accident on what the cure of the leper depended, and went
to Salerno to offer herself as the victim. No sooner was the offer
made than the lord was cured, and the damsel became his wife
(twelfth century).
⁂ This tale forms the subject of Longfellow’s Golden Legend
(1851).
Heir-at-Law. Baron Dubeley being dead, his “heir-at-law” was
Henry Morland, supposed to be drowned at sea, and the next heir
was Daniel Dowlas, a chandler of Gosport. Scarcely had Daniel been
raised to his new dignity, when Henry Morland, who had been cast
on Cape Breton, made his appearance, and the whole aspect of
affairs was changed. That Dowlas might still live in comfort, suitable
to his limited ambition, the heir of the barony settled on him a small
life annuity.—G. Colman, Heir-at-law, (1797).
Hel´a, queen of the dead. She is daughter of Loki and Angurbo
´da (a giantess). Her abode, called Helheim, was a vast castle in
Niflheim, in the midst of eternal snow and darkness.
Down the yawning steep he rode,
That leads to Hela’s drear abode.
Gray, Descent of Odin (1757).
Helen, wife of Menelāos of Sparta. She eloped with Paris, a
Trojan prince, while he was the guest of the Spartan king. Menelaos,
to avenge this wrong, induced the allied armies of Greece to invest
Troy; and after a siege of ten years, the city was taken and burnt to
the ground.
⁂ A parallel incident occurred in Ireland. Dervorghal, wife of
Tiernan O’Ruark, an Irish chief who held the county of Leitrim,
eloped with Dermod M’Murchad, prince of Leinster. Tiernan induced
O’Connor, king of Connaught, to avenge this wrong. So O’Connor
drove Dermod from his throne. Dermod applied to Henry II. of
England, and this was the incident which brought about the
conquest of Ireland (1172).—Leland, History of Ireland (1773).
Helen, the heroine of Miss Edgeworth’s novel of the same name.
This was her last and most popular tale (1834).
Helen, cousin of Modus, the bookworm. She loved her cousin, and
taught him there was a better “art of love” than that written by Ovid.
—S. Knowles, The Hunchback (1831).
Helen Lorrington. Accomplished young widow, Anne Douglas’s
intimate friend. She is the semi-betrothed of Ward Heathcote, who
nevertheless considers himself free to woo Anne. After many
complications, Heathcote, believing Anne already married becomes
Helen’s husband. The latter is murdered a year or two later under
circumstances that cast suspicion upon Heathcote. Through Anne’s
efforts and testimony he is acquitted, and finally marries her.—
Constance Fennimore Woolson, Anne (1882).
Helen (Lady), in love with Sir Edward Mortimer. Her uncle insulted
Sir Edward in a county assembly, struck him down, and trampled on
him. Sir Edward, returning home, encountered the drunken ruffian
and murdered him. He was tried for the crime, and acquitted
“without a stain upon his character;” but the knowledge of the deed
preyed upon his mind so that he could not marry the niece of the
murdered man. After leading a life of utter wretchedness, Sir Edward
told Helen that he was the murderer of her uncle, and died.—G.
Colman, The Iron Chest (1796).
Helen [Mowbray], in love with Walsingham. “Of all grace the
pattern—person, feature, mind, heart, everything as nature had
essayed to frame a work where none could find a flaw.” Allured by
Lord Athunree to a house of ill-fame, under pretence of doing a work
of charity, she was seen by Walsingham as she came out, and he
abandoned her as a wanton. She then assumed male attire, with the
name of Eustace. Walsingham became her friend, was told that
Eustace was Helen’s brother, and finally discovered that Eustace was
Helen herself. The mystery being cleared up, they became man and
wife.—S. Knowles, Woman’s Wit, etc. (1838).
Helen’s Fire (feu d’Hélène), a comazant called “St. Helme’s” or
“St. Elmo’s fire” by the Spaniards; the “fires of St. Peter and St.
Nicholas” by the Italians; and “Castor and Pollux” by the ancient
Romans. This electric light will sometimes play about the masts of
ships. If only one appears, foul weather may be looked for; but if
two or more flames appear, the worst of the storm is over.
Helen (Rolleston), heroine of Charles Reade’s novel, Foul Play. She
is betrothed to Wardlaw, chief villain of the story, and sets out on a
sea-voyage to restore her health; is shipwrecked and cast on an
island with Herbert Penfold. After their return to England, she rights
the wronged Penfold, and punishes Wardlaw.
Helen, wife of John Ward, Preacher. Her husband is a Calvinist of
a pronounced type; she a believer in Universal Salvation. The
spiritual agonies to which they are subjected by the difference in
creeds, separate them for a while and are the moving cause of John
Ward’s death. He passes away, convinced that “his death is to be the
climax of God’s plans for her.”—Margaret Deland, John Ward,
Preacher (1888).
Hel´ena (St.), daughter of Coel, duke Colchester, and afterwards
king of Britain. She married Constantius (a Roman senator, who
succeeded “Old King Cole”), and became the mother of Constantine
the Great. Constantius died at York (a.d. 306). Helena is said to have
discovered at Jerusalem the sepulchre and cross of Jesus Christ.—
Geoffrey, British History v. 6 (1142).
⁂ This legend is told of the Colchester arms, which consist of a
cross and three crowns (two atop and one at the foot of the cross).
At a considerable depth beneath the surface of the earth were found three
crosses which were instantly recognized as those on which Christ and the two
thieves had suffered death. To ascertain which was the true cross, a female corpse
was placed on all three alternately; the two first tried produced no effect, but the
third instantly reanimated the body.—J. Brady, Clavis Calendaria, 181.
Herself in person went to seek that holy cross
Whereon our Saviour died, which found, as it was sought;
From Salem unto Rome triumphantly she brought.
Drayton, Polyolbion, viii. (1612).
Helena, only daughter of Gerard de Narbon, the physician. She
was left under the charge of the countess of Rousillon, whose son
Bertram she fell in love with. The king sent for Bertram to the
palace, and Helena, hearing the king was ill, obtained permission of
the countess to give him a prescription left by her late father. The
medicine cured the king, and the king, in gratitude, promised to
make her the wife of any one of his courtiers that she chose. Helena
selected Bertram, and they were married; but the haughty count,
hating the alliance, left France, to join the army of the duke of
Florence. Helena, in the mean time, started on a pilgrimage to the
shrine of St. Jacques le Grand, carrying with her a letter from her
husband, stating that he would never see her more “till she could
get the ring from off his finger.” On her way to the shrine, she
lodged at Florence with a widow, the mother of Diana, with whom
Bertram was wantonly in love. Helena was permitted to pass herself
off as Diana, and received his visits, in one of which they exchanged
rings. Both soon after this returned to the Countess de Rousillon,
where the king was, and the king, seeing on Bertram’s finger the
ring which he gave to Helena, had him arrested on suspicion of
murder. Helena now explained the matter, and all was well, for all
ended well.—Shakespeare, All’s Well that ends Well (1598).
Helena is a young woman, seeking a man in marriage. The ordinary laws of
courtship are reversed, the habitual feelings are violated; yet with such exquisite
address this dangerous subject is handled that Helena’s forwardness loses her no
honor. Delicacy dispenses with her laws in her favor.—C. Lamb.
Helena, a young Athenian lady, in love with Demētrius. She was
the playmate of Her´mia, with whom she grew up, as “two cherries
on one stalk.” Egēus (3 syl.), the father of Hermia, promised his
daughter in marriage to Demetrius; but when Demetrius saw that
Hermia loved Lysander, he turned to Helena, who loved him dearly,
and married her.—Shakespeare, Midsummer Night’s Dream (1592).
Hel´inore (Dame), wife of Malbecco, who was jealous of her, and
not without cause. When Sir Paridel, Sir Sat´yrane (3 syl.), and
Britomart (as the squire of Dames) took refuge in Malbecco’s house,
Dame Helinore and Sir Paridel had many “false belgardes” at each
other, and talked love with glances which needed no interpreter.
Helinore, having set fire to the closet where Malbecco kept his
treasures, eloped with Paridel, while the old miser stopped to put
out the fire. Paridel soon tired of the dame, and cast her off, leaving
her to roam whither she listed. She was taken up by the satyrs, who
made her their dairy-woman, and crowned her queen of the May.—
Spenser, Faëry Queen, iii. 9, 10 (1590).
Viridi colore est gemma helitropion, non ita acuto sed nubilo magis et represso,
stellis puniceis superspersa. Causa nominis de effectu lapidis est et potestate.
Dejecta in labris æneis radios solis mutat sanguineo repercussu, utraque aqua
splendorem aëris abjicit et avertit. Etiam illud posse dicitur, ut herba ejusdem
nominis mixta et præcantationibus legitimis consecrata eum, a quocunque
gestabitur, subtrahat visibus obviorum.—Solinus, Geog., xl.
Helisane de Crenne, contemporary with Pâquier. She wrote her
own biography, including the “history of her own death.”—Angoisses
Doloureuses (Lyons, 1546).
Hel Keplein, a mantle of invisibility, belonging to the dwarf-king
Laurin. (See Invisibility.)—The Heldenbuch (thirteenth century).
Hell, according to Mohammedan belief is divided into seven
compartments: (1) for Mohammedans, (2) for Jews, (3) for
Christians, (4) for Sabians, (5) for Magians, (6) for idolaters, (7) for
hypocrites. All but idolaters and unbelievers will be in time released
from torment.
Hell, Dantê says, is a vast funnel divided into eight circles, with
ledges more or less rugged. Each circle, of course, is narrower that
the one above, and the last goes down to the very centre of the
earth. Before the circles begin, there is a neutral land and a limbo.
In the neutral land wander those not bad enough for hell nor good
enough for heaven; in the limbo, those who knew no sin but were
not baptized Christians. Coming then to hell proper, circle 1, he says,
is compassed by the river Achĕron, and in this division of inferno
dwell the spirits of the heathen philosophers. Circle 2 is presided
over by Minos, and here are the spirits of those guilty of carnal and
sinful love. Circle 3 is guarded by Cerbĕrus, and this is the region set
apart for gluttons. Circle 4, presided over by Plutus, is the realm of
the avaricious. Circle 5 contains the Stygian Lake, and here flounder
in deep mud those who in life put no restraint on their anger. Circle
6 (in the city of Dis) is for those who did violence to man by force or
fraud. Circle 7 (in the city of Dis) is for suicides. Circle 8 (also in the
city of Dis) is for blasphemers and heretics. After the eight circles
comes the ten pits or chasms of Malebolgê (4 syl.), the last of which
is the centre of the earth, and here he says is the frozen river of
Cocy´tus. (See Inferno.)
Hellespont. Leander used to swim across the Hellespont to visit
Hero, a priestess of Sestos. Lord Byron and Lieutenant Ekenhead
repeated the feat and accomplished it in seventy minutes, the
distance being four miles (allowing for drifting).
He could perhaps have passed the Hellespont,
As once (a feat on which ourselves we prided)
Leander, Mr. Ekenhead, and I did.
Byron, Don Juan, ii. 105 (1819).
Hellica´nus, the able and honest minister of Per´iclês, to whom
he left the charge of Tyre during his absence. Being offered the
crown, Hellicānus nobly declined the offer, and remained faithful to
the prince throughout.—Shakespeare, Pericles, Prince of Tyre (1608).
Helmet of Invisibility. The helmet of Perseus (2 syl.) rendered
the wearer invisible. This was in reality the “Helmet of Ha´dès,” and
after Perseus had slain Medu´sa he restored it, together with the
winged sandals and magic wallet. The “gorgon’s head” he presented
to Minerva, who placed it in the middle of her ægis. (See Invisibility.)
⁂ Mambrīno’s helmet had the same magical power, though Don
Quixote, even in his midsummer madness, never thought himself
invisible when he donned the barber’s basin.
Heloise. La Nouvelle Héloïse, a romance by Jean Jacques
Rousseau (1761).
He´mera, sister of Prince Memnon, mentioned by Dictys
Cretensis. Milton, in his Il Penseroso, speaks of “Prince Memnon’s
sister” (1638).
Hem´junah, princess of Cassimir´, daughter of the Sultan
Zebene´zer; betrothed at the age of 13 to the prince of Georgia. As
Hemjunah had never seen the prince, she ran away to avoid a
forced marriage, and was changed by Ulin, the enchanter, into a
toad. In this form she became acquainted with Misnar, sultan of
India, who had likewise been transformed into a toad by Ulin. Misnar
was disenchanted by a dervise, and slew Ulin; whereupon the
princess recovered her proper shape, and returned home. A rebellion
broke out in Cassimir, but the “angel of death” destroyed the rebel
army, and Zebenezer was restored to his throne. His surprise was
unbounded when he found that the prince of Georgia and the sultan
of India were one and the same person; and Hemjunah said, “Be
assured, O Sultan, that I shall not refuse the hand of the prince of
Georgia, even if my father commands my obedience.”—Sir C. Morell
[J. Ridly] Tales of the Genii (“Princess of Cassimir,” vii., 1751).
Hemlock. Socratês the Wise and Phocion the Good were both by
the Athenians condemned to death by hemlock juice, Socratês at the
age of 70 (B.C. 399) and Phocion at the age of 85 (B.C. 317).
Hemps´kirke (2 syl.), a captain serving under Wolfort, the
usurper of the earldom of Flanders.—Beaumont and Fletcher, The
Beggar’s Bush (1622).
Henderson (Rodney syl.), representative American who makes
money by unscrupulous operations in stocks.—Charles Dudley
Warner, A Little Journey in the World (1889).
Henderson (Elias) syl., chaplain at Lochleven Castle.—Sir W. Scott,
The Abbot (time, Elizabeth).
Henneberg (Count syl.). One day a beggar-woman asked Count
Henneberg’s wife for alms. The countess twitted her for carrying
twins, whereupon the woman cursed her, with the assurance that
“her ladyship should be the mother of 365 children.” The legend says
that the countess bore them at one birth, but none of them lived any
length of time. All the girls were named Elizabeth, and all the boys
John. They are buried, we are told, at the Hague.
Henrietta Maria, widow of King Charles I., introduced in Sir W.
Scott’s Peveril of the Peak (1823).
Henrietta Street, Cavendish Square, London, is so called in
compliment to Henrietta Cavendish, daughter of John Holles, duke of
Newcastle, and wife of Edward, second earl of Oxford and Mortimer.
From these come “Edward Street,” “Henrietta Street,” “Cavendish
Square,” and “Holles Street.”
Henriette (3 syl.), daughter of Chrysale (2 syl.) and Philaminte (3
syl.). She is in love with Clitandre, and ultimately becomes his wife.
Philaminte, who is a blue-stocking, wants Henriette to marry
Trissotin, a bel esprit; and Armande the sister, also a bas bleu, thinks
that Henriette ought to devote her life to science and philosophy;
but Henriette loves woman’s work far better, and thinks that her
natural province is domestic life, with wifely and motherly duties.
Her father Chrysale takes the same views of woman’s life as his
daughter Henriette, but he is quite under the thumb of his strong-
minded wife. However love at last prevails, and Henriette is given in
marriage to the man of her choice. The French call Henriette “the
type of a perfect woman,” i.e., a thorough woman.—Molière, Les
Femmes Savantes (1672).
Henrique (Don), an uxorious lord, cruel to his younger brother
Don Jamie. Don Henrique is the father of Asca´nio, and the
supposed husband of Violan´te (4 syl.).—Beaumont and Fletcher,
The Spanish Curate (1622).
Henri, boy, four years old, who, finding his friend “the doctor”
bound naked to a trestle to which he was strapped by pirates,
follows his directions and gnaws asunder the strips of raw hide tying
the victim down, and frees him.—Henry Augustus Wise, U.S.N.,
Captain Brand of the Schooner Centipede (1864).
Henry, a soldier engaged to Louisa. Some rumors of gallantry to
Henry’s disadvantage having reached the village, he is told that
Louisa is about to be married to another. In his despair he gives
himself up as a deserter, and is condemned to death. Louisa now
goes to the king, explains to him the whole matter, obtains her
sweetheart’s pardon, and reaches the jail just as the muffled drum
begins to beat the death march.—Dibdin, The Deserter (1770).
Henry, son of Sir Philip Blandford’s brother. Both the brothers
loved the same lady, but the younger marrying her, Sir Philip, in his
rage, stabbed him, as it was thought, mortally. In due time, the
young “widow” had a son (Henry) a very high-minded, chivalrous
young man, greatly beloved by every one. After twenty years, his
father re-appeared under the name of Morrington, and Henry
married his cousin Emma Blandford.—Thom. Morton, Speed the
Plough (1798).
Henry (Poor), prince of Hoheneck, in Bavaria. Being struck with
leprosy, he quitted his lordly castle, gave largely to the poor, and
retired to live with a small cottage farmer named Gottlieb [Got.leeb],
one of his vassals. He was told that he would never be cured till a
virgin, chaste and spotless, offered to die on his behalf. Elsie, the
farmer’s daughter, offered herself, and after great resistance, the
prince accompanied her to Salerno to complete the sacrifice. When
he arrived at the city, either the exercise, the excitement, or the
charm of some relic, no matter what, had effected an entire cure,
and when he took Elsie into the cathedral, the only sacrifice she had
to make was that of her maiden name for Lady Alicia, wife of Prince
Henry of Hoheneck.—Hartmann von der Aue (minnesinger), Poor
Henry (twelfth century).
⁂ This tale is the subject of Longfellow’s Golden Legend (1851).
Henry (Patrick), Virginian orator, who, in the House of Burgesses,
first raised the cry of “Liberty or Death” in the struggle of the
American Colonies for Independence.
Patrick Henry’s first legal triumph was in November, 1763, in the
since famous Parson’s Cause.
“In the language of those who heard him on this occasion, ‘he
made their blood run cold, and their hair to rise on end ...’”
“The jury seem to have been so completely bewildered, that, thoughtless even
of the admitted right of the plaintiff, they had scarcely left the bar when they
returned with a verdict of one penny damages.”—William Wirt, Life of Patrick
Henry (1818).
Henry (Prince), Bernardine du Born, arraigned for treason, replies
to King Henry’s questions,
“Hath reason quite forsook thy breast?”
with
“My reason failed, my gracious liege,
The year Prince Henry died.”
The king, smitten by memories of his son, whose chosen intimate
Bernardine was, forgives the offender:—
“For the dear sake of the dead
Go forth—unscathed and free.”
Lydia Huntley Sigourney, Poems (1836).
Henry II., king of England, introduced by Sir W. Scott, both in
The Betrothed and in The Talisman (1825).
Henry V., Shakespeare’s drama, founded on The Famous
Victories of Henry V.: containing the Honorable Battle of Agincourt.
As it is plaide by the Queenes Magesties players, 1598.
Shakespeare’s play appeared in print in 1600 (quarto).
Henry VI., Shakespeare’s dramas of this reign are founded on
The First Part of the Contention betwixt the two Famous Houses of
Yorke and Lancaster, with the Death of the Good Duke Humphrey,
etc. As it was sundry times acted by the Right Honorable the Earle of
Pembroke his Servants, 1600.
Another. The True Tragedie of Richard Duke of Yorke, and the
Death of Good Henri VI., etc. As it was sundry times acted ... (as
above).
Henry VIII. and Anne Boleyn. Anne Boleyn was the second
wife of Henry VIII. He divorced Katharine of Aragon in order to
marry Anne; wearied of her in turn, and had her beheaded in 1536.
He´par, the Liver personified, the arch-city in The Purple Island,
by Phineas Fletcher. Fully described in canto iii. (1633).
Hephæs´tos, the Greek name for Vulcan. The Vulcanic period of
geology is that unknown period before the creation of man, when
the molten granite and buried metals were upheaved by internal
heat, through the overlying strata, sometimes even to the very
surface of the earth.
The early dawn and dusk of Time.
The reign of dateless old Hephæstus.
Longfellow, The Golden Legend (1851).
Hepzibah (Pyncheon), gentlewoman, reduced to the necessity of
keeping a small shop in the ancient homestead. She idolizes her
brother Clifford, a melancholy, refined man, who, terrified by an
empty threat of his cousin, Judge Pyncheon, flees the house.
Hepzibah goes with him. Recovering from their panic, they return in
time to avoid the suspicion of having caused the Judge’s sudden
death, which makes them rich.—Nathaniel Hawthorne, House of the
Seven Gables (1851).
Herbert (Sir William), friend of Sir Hugo de Lacy.—Sir W. Scott,
The Betrothed (time, Henry II.).
Her´culês shot Nessus for offering insult to his wife Dei´-j-a-nī-
ra, and the dying centaur told Deijanira that if she dipped in his
blood her husband’s shirt, she would secure his love forever.
Herculês, being about to offer sacrifice, sent Lichas for the shirt; but
no sooner was it warmed by the heat of his body than it caused
such excruciating agony that the hero went mad, and seizing Lichas,
he flung him into the sea.
Herculés Mad is the subject of a Greek tragedy by Eurip´idês, and
of a Latin one by Sen´eca.
As when Alcīdês ... felt the envenomed robe, and tore,
Thro’ pain, up by the roots Thessalian pines,
And Lichas from the top of Œta [a mount] threw
Into the Euboic Sea [The Archipelago].
Milton, Paradise Lost, ii. 542, etc. [1665].
⁂ Diodōrus says there were three Herculêses; Cicero recognizes
six (three of which were Greeks, one Egyptian, one Cretan, and one
Indian); Varro says there were forty-three.
Herculés’s Choice. When Herculês was a young man, he was
accosted by two women, Pleasure and Virtue, and asked to choose
which he would follow. Pleasure promised him all carnal delights, but
Virtue promised him immortality. Herculês gave his hand to the
latter, and hence led a life of great toil, but was ultimately received
amongst the immortals.—Xenophon.
⁂ Mrs. Barbauld has borrowed this allegory, but instead of
Herculês has substituted Melissa, “a young girl,” who is accosted by
Dissipation and Housewifery. While she is somewhat in doubt which
to follow, Dissipation’s mask falls off, and immediately Melissa
beholds such a “wan and ghastly countenance,” that she turns away
in horror, and gives her hand to the more sober of the two ladies.—
Evenings at Home, xix. (1795).
Herculês’s Horse, Arion, given him by Adrastos. It had the gift of
human speech, and its feet on the right side were those of a man.
Herculês’s Pillars, Calpê and Ab´yla, one at Gibraltar and the other
at Ceuta (3 syl.). They were torn asunder by Alcīdês on his route to
Gadês (Cadiz).
Herculês’s Ports: (1) “Herculis Corsani Portus” (now called Porto-
Ercolo, in Etruria); (2) “Herculis Liburni Portus” (now called Livorno,
i.e. Leghorn); (3) “Herculis Monœci-Portus” (now called Monaco,
near Nice).
Herculês (The Attic), Theseus (2 syl.), who went about, like
Herculês, destroying robbers, and performing most wonderful
exploits.
Herculês (The Cretan). All the three Idæan Dactyls were so called:
viz., Kelmis (“the smelter”), Damnamĕneus (“the hammer”), and
Acmon (“the anvil”).
Herculês (The Egyptian), Sesostris (fl. B.C. 1500). Another was
Som or Chon, called by Pausanias, Macĕris, son of Amon.
Herculês (The English), Guy, earl of Warwick (890-958).
Warwick ... thou English Herculês.
Drayton, Polyolbion, xiii. (1613).
Herculês (The Farnesê), a statue, the work of Glykon, copied from
one by Lysip´pos, called Farnesê, because formerly in the Farnesê
palace in Rome with the Farnesê Bull, the Flora, and the Gladiator.
All but the Gladiator are now in the Naples Museum. The Gladiator is
in the British Museum. The “Farnesê Herculês” represents the hero
exhausted by toil, leaning on his club; and in his left hand, which
rests on his back, he holds one of the apples of the Hesperĭdês.
⁂ A copy of this famous statue stands in the Tuileries gardens of
Paris. An excellent description of the statue is given by Thomson, in
his Liberty, iv.
Herculês (The Indian), Dorsănês, who married Pandæa, and
became the progenitor of the Indian kings. Belus is sometimes called
“The Indian Herculês.”
Herculês (The Jewish), Samson (died B.C. 113).
Herculês (The Russian), Rustum.
Herculês (The Swedish), Starchatĕrus (first Christian century).
Hercules of Music, Christoph von Glück (1714-1787).
Herculês Secundus. Commŏdus, the Roman emperor, gave
himself this title. He was a gigantic idiot, who killed 100 lions, and
overthrew 1000 gladiators in the amphitheatre (161, 180-195).
Heren-Suge (The), a seven-headed hydra of Basque mythology,
like the Deccan cobras.
Heretics (Hammer of), Pierre d’Ailly (1350-1425).
John Faber is also called “The Hammer of Heretics,” from the title
of one of his works (*-1541).
Heretics (Scientific).
Feargal, bishop of Saltzburg, an Irishman, was denounced as a
heretic for asserting the existence of antipodês (*-784).
Galileo, the astronomer, was cast into prison for maintaining the
“heretical opinion” that the earth moved round the sun (1564-1642).
Giordano Bruno was burnt alive for maintaining that matter is the
mother of all things (1550-1600).
Her´eward (3 syl.), one of the Varangian guard of Alexius
Comnēnus, emperor of Greece.—Sir W. Scott, Count Robert of Paris
(time, Rufus).
Hereward the Wake (or Vigilant), lord of Born, in Lincolnshire.
He plundered and burnt the abbey of Peterborough (1070);
established his camp in the Isle of Ely, where he was joined by Earl
Morcar (1071); he was blockaded for three months by William I., but
made his escape with some of his followers. This is the name and
subject of one of Kingsley’s novels.
Her´iot (Master George), goldsmith to James I.; guardian of Lady
Hermionê.—Sir W. Scott, Fortunes of Nigel (time, James I.).
Herman, a deaf and dumb boy, jailer of the dungeon of the
Giant’s Mount. Meeting Ulrica, he tries to seize her, when a flash of
lightning strikes the bridge on which he stands, and Herman is
thrown into the torrent.—E. Stirling, The Prisoner of State (1847).
Herman (Sir), of Goodalicke, one of the perceptors of the Knights
Templars.—Sir W. Scott, Ivanhoe (time, Richard I.).
Hermann, the hero of Goethe’s poem Hermann and Dorothea.
Goethe tells us that the object of this poem is to “show as in a
mirror, the great movements and changes of the world’s stage.”
Hermaph´rodite (4 syl.), son of Venus and Mercury. At the age
of 15, he bathed in a fountain of Caria, when Sal´macis, the
fountain nymph, fell in love with him, and prayed the gods to make
the two one body. Her prayers being heard, the two became united
into one, but still preserved the double sex.
Not that bright spring where fair Hermaphrodite
Grew into one with wanton Salmacis ...
... may dare compare with this.
Phin. Fletcher, The Purple Island, v. (1633).
Hermegild or Hermyngyld, wife of the lord-constable of
Northumberland. She was converted by Constance, but was
murdered by a knight whose suit had been rejected by the young
guest, in order to bring her into trouble. The villainy being
discovered, the knight was executed, and Constance married the
king, whose name was Alla. Hermegild, at the bidding of Constance,
restored sight to a blind Briton.—Chaucer, Canterbury Tales (“Man of
Law’s Tale,” 1388).
(The word is spelt “Custaunce” 7 times, “Constance” 15 times, and
“Constaunce” 17 times, in the tale.)
Hermegild, a friend of Oswald, in love with Gartha (Oswald’s
sister). He was a man in the middle age of life, of counsel sage, and
great prudence. When Hubert (the brother of Oswald) and Gartha
wished to stir up a civil war to avenge the death of Oswald, who had
been slain in single combat with Prince Gondibert, Hermegild wisely
deterred them from the rash attempt, and diverted the anger of the
camp by funeral obsequies of a most imposing character. The tale of
Gondibert being unfinished, the sequel is not known.—Sir W.
Davenant, Gondibert (died 1668).
Her´mês (2 syl.), son of Maia; patron of commerce. Akenside
makes Hermês say to the Thames, referring to the merchant ships of
England:
By you [ships] my function and my honored name
Do I possess; while o’er the Bætic vale,
Or thro’ the towers of Memphis, or the palms
By sacred Ganges watered, I conduct
The English merchant.
Akenside, Hymn to the Naiads (1767).
(The Bætis is the Guadalquiver, and the Bætic vale Granāda and
Andalucia).
Her´mês (2 syl.), the same as Mercury, and applied both to the
god and to the metal. Milton calls quicksilver “volatil Hermês.”
So when we see the liquid metal fall,
Which chemists by the name of Hermes call.
Hoole’s Ariosto, viii.
Hermês (St.), same as St. Elmo, Suerpo Santo, Castor and Pollux,
etc. A comazant or electric light, seen occasionally on ship’s masts.
“They shall see the fire which saylors call St. Hermes, fly uppon their shippe,
and alight upon the toppe of the mast.”—De Loier, Treatise of Spectres, 67 (1605).
Hermês Trismegis´tus (Hermês “thrice-greatest”), the Egyptian
Thoth, to whom is ascribed a host of inventions: as the art of writing
in hieroglyphics, the first Egyptian code of laws, the art of harmony,
the science of astrology, the invention of the late and lyre, magic,
etc. (twentieth century B.C.).
The school of Hermês Trismegistus,
Who uttered his oracles sublime
Before the Olympiads.
Longfellow, The Golden Legend (1851).
Her´mesind (3 syl.), daughter of Pelayo and Gaudio´sê. She was
plighted to Alphonso, son of Lord Pedro of Cantabria. Both Alphonso
and Hermesind at death were buried in the cave of St. Antony, in
Covadonga.
Her´mia, daughter of Ege´us (3 syl.) of Athens, and promised by
him in marriage to Demētrius. As Hermia loved Lysander, and
refused to marry Demetrius, her father summoned her before the
duke, and requested that the “law of the land” might be carried out,
which was death or perpetual virginity. The duke gave Hermia four
days to consider the subject, at the expiration of which time she was
either to obey her father or lose her life. She now fled from Athens
with Lysander. Demetrius went in pursuit of her, and Helĕna, who
doted on Demetrius, followed. All four came to a wood, and falling
asleep from weariness, had a dream about the fairies. When
Demetrius woke up, he came to his senses, and seeing that Hermia
loved another, consented to marry Helena; and Egēus gladly gave
the hand of his daughter to Lysander.—Shakespeare, Midsummer
Night’s Dream (1592).
Herm´ion, the young wife of Damon “the Pythagore´an” and
senator of Syracuse.—J. Banium, Damon and Pythias (1825).
Hermionê (4 syl.) or Harmo´nia, wife of Cadmus. Leaving Thebes,
Cadmus and his wife went to Illyr´ia, and were both changed into
serpents for having killed a serpent sacred to Mars.—Ovid,
Metamorphoses, iv. 590, etc.
Never since of serpent-kind
Lovelier, not those that in Illyria changed—
Hermionê and Cadmus.
Milton, Paradise Lost, ix. 505, etc. (1665).
Hermionê, (4 syl.), wife of Leontês, king of Sicily. The king, being
jealous, sent her to prison, where she gave birth to a daughter, who,
at the king’s command, was to be placed on a desert shore and left
to perish. The child was driven by a storm to the “coast” of Bohemia,
and brought up by a shepherd who called her Per´dĭta. Florĭzel, the
son of Polixenês, king of Bohemia, fell in love with her, and they fled
to Sicily to escape the vengeance of the angry king. Being
introduced to Leontês, it was soon discovered that Perdita was his
lost daughter, and Polixenês gladly consented to the union he had
before objected to. Pauli´na (a lady about the court) now asked the
royal party to her house to inspect a statue of Hermionê, which
turned out to be the living queen herself.—Shakespeare, The
Winter’s Tale (1594).
Hermionê, (4 syl.), only daughter of Helen and Menelā´os (4 syl.)
king of Sparta. She was betrothed to Orestês, but after the fall of
Troy was promised by her father in marriage to Pyrrhus, king of
Epirus. Orestes madly loved her, but Hermione as madly loved
Pyrrhus. When Pyrrhus fixed his affections on Androm´achê (widow
of Hector, and his captive), the pride and jealousy of Hermione were
roused. At this crisis, an embassy led by Orestês arrived at the court
of Pyrrhus, to demand the death of Asty´anax, the son of
Andromachê and Hector, lest when he grew to manhood he might
seek to avenge his father’s death. Pyrrhus declined to give up the
boy, and married Andromachê. The passion of Hermionê was now
goaded to madness; and when she heard that the Greek
ambassadors had fallen on Pyrrhus and murdered him, she stabbed
herself and died.—Ambrose Philips, The Distressed Mother (1712).
This was a famous part with Mrs. Porter (*-1762), and with Miss
Young, better known as Mrs. Pope (1740-1797).
Hermionê (4 syl.), daughter of Dannischemend, the Persian
sorcerer, mentioned in Donnerhugel’s narrative.—Sir W. Scott, Anne
of Geierstein (time, Edward IV.).
Hermionê (The Lady), or Lady Ermin´ia Pauletti, privately married
to Lord Dalgarno.—Sir W. Scott, Fortunes of Nigel (time, James I.).
Hermit, the pseudonym of the poet Hayley, the friend of Cowper.
Hermit (The English), Roger Crab, who subsisted on three
farthings a week, his food being bran, herbs, roots, dock leaves, and
mallows (*-1680).
Hermit (Peter the), the instigator of the first crusade (1050-1115).
Hermit and the Youth (The). A hermit, desirous to study the
ways of Providence, met with a youth, who became his companion.
The first night, they were most hospitably entertained by a
nobleman, but at parting the young man stole his entertainer’s
golden goblet. Next day, they obtained with difficulty of a miser
shelter from a severe storm, and at parting the youth gave him the
golden goblet. Next night, they were modestly but freely welcomed
by one of the middle class, and at parting the youth “crept to the
cradle where an infant slept, and wrung its neck.” It was the only
child of their kind host. Leaving the hospitable roof, they lost their
way, and were set right by a guide, whom the youth pushed into a
river, and he was drowned. The hermit began to curse the youth,
when lo! he turned into an angel, who thus explained his acts:
“I stole the goblet from the rich lord to teach him not to trust in uncertain
riches. I gave the goblet to the miser to teach him that kindness always meets its
reward. I strangled the infant because the man loved it better than he loved God.
I pushed the guide into the river because he intended at night-fall to commit a
robbery.” The hermit bent his head and cried, “The ways of the Lord are past
finding out! but He doeth all things well. Teach me to say with faith, ‘Thy will be
done?’”—Parnell. (1679-1717).
In the Talmud is a similar and better allegory. Rabbi Jachanan
accompanied Elijah on a journey, and they came to the house of a
poor man, whose only treasure was a cow. The man and his wife ran
to meet and welcome the strangers, but next morning the poor
man’s cow died. Next night they were coldly received by a proud,
rich man, who fed them only with bread and water; and next
morning Elijah sent for a mason to repair a wall which was falling
down, in return for the hospitality received. Next night they entered
a synagogue, and asked, “Who will give a night’s lodging to two
travellers!” but none offered to do so. At parting, Elijah said, “I hope
you will all be made presidents.” The following night they were
lodged by the members of another synagogue in the best hotel of
the place, and at parting Elijah said, “May the Lord appoint over you
but one president.” The rabbi, unable to keep silence any longer,
begged Elijah to explain the meaning of his dealings with men; and
Elijah replied:
“In regard to the poor man who received us so hospitably, it was decreed that
his wife was to die that night, but, in reward of his kindness, God took the cow
instead of the wife. I repaired the wall of the rich miser because a chest of gold
was concealed near the place, and if the miser had repaired the wall he would
have discovered the treasure. I said to the inhospitable synagogue, ‘May each
member be president,’ because no one can serve two masters. I said to the
hospitable synagogue, ‘May you have but one president,’ because with one head
there can be no divisions of counsel. Say not, therefore, to the Lord, ‘What doest
Thou?’ but say in thy heart, ‘Must not the Lord of all the earth do right’”—The
Talmud (“Trust in God”).
Hermite (Tristan l’) or “Tristan of the Hospital,” provost-marshal
of France. He was the main instrument in carrying out the nefarious
schemes of Louis XI, who used to call him his “gossip.” Tristan was a
stout, middle-sized man, with a hang-dog visage and most repulsive
smile.—Sir W. Scott, Quentin Durward and Anne of Geierstein (time,
Edward IV.).
Hero, daughter of Leonāto, governor of Messi´na. She was of a
quiet, serious disposition, and formed a good contrast to the gay,
witty rattle-pate, called Beatrice, her cousin. Hero was about to be
married to Lord Claudio, when Don John played on her a most
infamous practical joke, out of malice. He bribed Hero’s waiting-
woman to dress in Hero’s clothes, and to talk with him by moonlight
from the chamber balcony; he then induced Claudio to hide himself
in the garden, to overhear what was said. Claudio, thinking the
person to be Hero, was furious, and next day at the altar rejected
the bride with scorn. The priest, convinced of Hero’s innocence, gave
out that she was dead, the servant confessed the trick, Don John
took to flight, and Hero married Claudio, her betrothed.—
Shakespeare, Much Ado about Nothing (1600).
Hero, [Sutton], niece of Sir William Sutton, and beloved by Sir
Valentine de Grey. Hero “was fair as no eye ever fairer saw, of noble
stature, head of antique mould, magnificent as far as may consist
with softness, features full of thought and moods, wishes and
fancies, and limbs the paragon of symmetry.” Having offended her
lover by waltzing with Lord Athunree, she assumed the garb of a
quakeress, called herself “Ruth,” and got introduced to Sir Valentine,
who proposed marriage to her, and then discovered that Hero was
Ruth and Ruth was Hero.—S. Knowles, Woman’s Wit, etc. (1838).
Hero and Leander (3 syl.). Hero, a priestess of Venus, fell in
love with Leander, who swam across the Hellespont every night to
visit her. One night he was drowned in so doing, and Hero in grief
threw herself into the same sea.—Musæus, Leander and Hero.
Hero of Fable (The), the duc de Guise. Called by the French
L’Hero de la Fable (1614-1664).
Hero of History (The), the duc d’Enghien, Prince of Condé.
Called by the French L’Hero de l’Histoire. This was Le grand Condé
(1621-1687).
Hero of Modern Italy, Garibaldi (1807-1882).
Herodias. Divorced wife of Herodius Philippus, afterward married
to Herod Antipas, Mother of Salome and murderer of John the
Baptist.
Her´on (Sir George), of Chip-chace, an officer with Sir John
Foster.—Sir W. Scott, The Monastery (time, Elizabeth).
Heros´tratos or Erostratos, the Ephesian who set fire to the
temple of Ephesus (one of the seven wonders of the world) merely
to immortalize his name. The Ephesians made it penal even to
mention his name.
Herostratus shall prove vice governes fame.
Who built that church he burnt hath lost his name.
Lord Brooke, Inquisition upon Fame (1554-1628).
Herrick. Overseer on a Virginia plantation, whose only daughter
is burned to death trying to save a favorite horse of the man she
loves hopelessly.—Amelia C. Rives-Chanler, Virginia of Virginia,
(1888).
Herries (Lord), a friend of Queen Mary of Scotland, and attending
on her at Dundrennan.—Sir W. Scott, The Abbott (time, Elizabeth).
Herschel (Sir F. Wm.) discovered the eighth planet, at first called
the Georgium sidus, in honor of George III., and now called Saturn.
In allusion to this, Campbell says he
Gave the lyre of heaven another string.
Pleasures of Hope, i. (1799.)
Hertford (The marquis of), in the court of Charles II.—Sir W.
Scott, Woodstock (time, Commonwealth).
Her Trippa, meant for Henry Cornelius Agrippa, of Nettesheim,
philosopher and physician. “Her” is a contraction of He´ricus, and
“Trippa” a play on the words Agrippa and tripe.—Rabelais, Pantag
´ruel, iii. 25 (1545).
Herwig, king of Hel´igoland, betrothed to Gudrun, daughter of
King Hettel (Attila). She was carried off by Hartmuth, king of
Norway, and as she refused to marry him, was put to the most
menial work. Herwig conveyed an army into Norway, utterly
defeated Hartmuth, liberated Gudrun, and married her.—Gudrun, a
German epic of the thirteenth century.
Her´zog (Duke), commander-in-chief of the ancient Teutons
(Germans). The herzog was elected by the freemen of the tribe, but
in times of war and danger, when several tribes united, the princes
selected a leader, who was called also “herzog,” similiar to the
Gaulish “brennus” or “bren,” and the Celtic “pendragon” or head
chief.
Heskett (Ralph), landlord of the village ale-house where Robin
Oig and Harry Wakefield fought.
Dame Heskett, Ralph’s wife.—Sir. W. Scott, The Two Drovers (time,
George III.).
Hesper´ides (4 syl.) The Hesper´ian Field. The Hesperidês were
the women who guarded the golden apples which Earth gave to
Herê at her marriage with Zeus (Jove). They were assisted by the
dragon Ladon. The Hesperian Fields are the orchards in which the
golden apples grew. The Island is one of the Cape Verd Isles, in the
Atlantic.
Hesperus, the knight called by Tennyson “Evening Star;” but
called in the History of Prince Arthur, “the Green Knight” or Sir
Pertolope (3 syl.). One of the four brothers who kept the passages
of Castle Perilous.—Tennyson, Idylls (“Gareth and Lynette”); Sir T.
Malory, History of Prince Arthur, i. 127 (1470).
⁂ It is a manifest blunder to call the Green Knight “Hesperus the
Evening Star,” and the Blue Knight the “Morning Star.” The old
romance makes the combat with the “Green Knight” at dawn, and
with the “Blue Knight” at sunset. The error has arisen from not
bearing in mind that our forefathers began the day with the
preceding eve, and ended it at sunset.
Hetherford (Reuben), stupid suitor of Molly Wilder. He will not
relinquish her, although assured that she is to marry another man,
and when the news comes that her husband has been drowned,
renews his suit, only to be again rejected.—Jane Goodwin Austin, A
Nameless Nobleman (1881).
Hettly (May), an old servant of Davie Deans.—Sir W. Scott, Heart
of Midlothian (time, George II.).
Heyward (Duncan). A major in the English army in America, sent
to escort the Munro sisters to their father, and sharer in the perils
incurred by them in their journey by stream and forest. He is
beloved by both sisters and marries Alice.—James Fennimore Cooper,
Last of the Mohicans.
Heukbane (Mrs.), the butcher’s wife at Fairport, and a friend of
Mrs. Mailsetter.—Sir W. Scott, The Antiquary (time, George III.).
Hew, son of Lady Helen of “Merryland town” (Milan), enticed by
an apple presented to him by a Jewish maiden, who then “stabbed
him with a penknife, rolled the body in lead, and cast it into a well.”
Lady Helen went in search of her child, and its ghost cried out from
the bottom of the well:
The lead is wondrous heavy, mither;
The well is wondrous deep:
A keen penknife sticks in my heart;
A word I dounae speik.
Percy, Reliques, i. 3.
Hewit (Godfrey Bertram), natural son of Mr. Godfrey Betram.—Sir
W. Scott, Guy Mannering (time, George II.).
Hezekiah Grumbles, intended by nature for a farmer; intended
by parents for a clergyman; makes a soldier of himself in the Civil
War 1861-65.—William M. Baker, The Making of a Man (1881).
Hezekiah Bedott, easy-going, meek and slow-spoken husband
of Priscilla Bedott. “Wonderful hand to moralize, specially after he
begun to enjoy poor health.”—Frances Miriam Twitcher, The Widow
Bedott Papers (1856).
Hiawa´tha, the prophet teacher, son of Mudjekee´wis (the west
wind) and Weno´nah, daughter of Noko´mis. He represents the
progress of civilization among the North American Indians. Hiawatha
first wrestled with Monda´min (maize), and, having subdued it, gave
it to man for food. He then taught man navigation; then he subdued
Mishe Nah´ma (the sturgeon), and taught the Indians how to make
oil therefrom for winter. His next exploit was against the magician
Megissog´non, the author of disease and death; having slain this
monster, he taught man the science of medicine. He then married
Minneha´ha (laughing water), and taught man to be the husband of
one wife, and the comforts of domestic peace. Lastly, he taught man
picture-writing. When the white men came with the gospel,
Hiawatha ascended to the kingdom of Pone´mah, the land of the
hereafter.—Longfellow, Hiawatha.
Hiawatha’s Moc´casins. When Hiawatha put on his moccasins, he
could measure a mile at a single stride.
He had moccasins enchanted,
Magic moccasins of deer-skin;
When he bound them round his ankles
At each stride a mile he measured.
Longfellow, Hiawatha, iv.
Hiawatha’s Great Friends, Chibia´bos (the sweetest of all
musicians) and Kwa´sind (the strongest of all mortals).—Longfellow,
Hiawatha, vi.
Hick´athrift (Tom or Jack), a poor laborer in the time of the
Conquest, of such enormous strength that he killed, with an axletree
and cartwheel, a huge giant, who lived in a marsh at Tylney, in
Norfolk. He was knighted, and made governor of Thanet. Hickathrift
is sometimes called Hickafric.
When a man sits down to write a history, though it be but the history of Jack
Hickathrift, ... he knows no more than his heels what lets ... he is to meet with in
his way.—Sterne.
Hick´ory (Old), General Andrew Jackson. He was first called
“Tough,” then “Tough as Hickory,” and, lastly, “Old Hickory.” Another
story is that in 1813, when engaged in war with the Creek Indians,
he fell short of supplies, and fed his men on hickory nuts (1767-
1845).
Hicks, short, slight young man ... with an air at once amiable and
baddish, whose father sends him on a sea-voyage to cure him of
drunkenness.—William Dean Howells, The Lady of the Aroostook
(1879).
Hi´erocles (4 syl.), the first person who compiled jokes and bon
mots. After a life-long labor, he got together twenty-one, which he
left to the world as his legacy. Hence arose the phrase, An Hieroc
´lean legacy, no legacy at all, or a legacy of empty promises, or a
legacy of no worth.
One of his anecdotes is that of a man who wanted to sell his
house, and carried about a brick to show as a specimen of it.
Hieron´imo, the chief character of Thomas Kyd’s drama in two
parts, pt. i. being called Hieronimo, and pt. ii. The Spanish Tragedy,
or Hieronimo is Mad Again. In the latter play, Horatio, only son of
Hieronimo, sitting with Belimpe´ria in an alcove, is murdered by his
rival, Balthazar, and the lady’s brother, Lorenzo. The murderers hang
the dead body on a tree in the garden, and Hieronimo, aroused by
the screams of Belimperia, rushing into the garden, sees the dead
body of his son, and goes raving mad (1588).
Higden (Mrs. Betty), an old woman nearly four score, very poor,
but hating the union-house more than she feared death. Betty
Higden kept a mangle, and “minded young children” at four-pence a
week. A poor workhouse lad named Sloppy helped her to turn the
mangle. Mrs. Boffin wished to adopt Johnny, Betty’s infant
grandchild, but he died in the Children’s Hospital.
She was one of those old women, was Mrs. Betty Higden, who, by dint of an
indomitable purpose and a strong constitution, fight out many years; an active old
woman, with a bright dark eye and a resolute face, yet quite a tender creature,
too.—C. Dickens, Our Mutual Friend, i. 16 (1864).
Higg, “the son of Snell,” the lame witness at the trial of Rebecca.
—Sir W. Scott, Ivanhoe (time, Richard I.).
Higgen, Prigg, Snapp, and Ferret, knavish beggars in The
Beggar’s Bush, a drama by Beaumont and Fletcher (1622).
High and Low Heels, two factions in Lilliput. So called from the
high and low heels of their shoes, badges of the two factions. The
high heels (tories and the high-church party) were friendly to the
ancient constitution of the empire, but the emperor employed the
Low-heels (whigs and low-churchmen) as his ministers of state.—
Swift, Gulliver’s Travels (“Lilliput,” 1726).
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookultra.com
Ad

Recommended

PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
mavriclasme
 
PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
bhaveeranirh
 
PDF
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
kapuilakna
 
PDF
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
raiyaalaiaya
 
PDF
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
trddarvai
 
PDF
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
servanjervy
 
PDF
Postgresql Up And Running Regina Obe Leo Hsu
zahidtraaslw
 
PDF
Learning postgresql
DAVID RAUDALES
 
PDF
0292-introduction-postgresql.pdf
Mustafa Keskin
 
PDF
Postgresql v15.1
Banking at Ho Chi Minh city
 
PDF
Postgresql v14.6 Document Guide
Banking at Ho Chi Minh city
 
PPTX
PostgreSQL- An Introduction
Smita Prasad
 
PDF
Bn 1016 demo postgre sql-online-training
conline training
 
PPTX
Chjkkkkkkkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjj01_The Basics.pptx
MhmdMk10
 
PDF
PostgreSQL - Case Study
S.Shayan Daneshvar
 
PDF
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
PDF
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
PDF
postgresql 16.3(latest version) 2024-25.pdf
ayaankim007
 
PDF
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
mowwoiq538
 
PDF
Business logic with PostgreSQL and Python
Hubert Piotrowski
 
PDF
Postgresql quick guide
Ashoka Vanjare
 
PDF
Postgresql 9.3-a4
Mayank Kothawade
 
ODP
Introduction to PostgreSQL
Jim Mlodgenski
 
PDF
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
bligesilva28
 
PDF
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
PDF
PostgreSQL Prologue
Md. Golam Hossain
 
PPTX
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
Reactive.IO
 
PPTX
PostgreSQL Database Slides
metsarin
 
PDF
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
PPTX
Photo chemistry Power Point Presentation
mprpgcwa2024
 

More Related Content

Similar to PostgreSQL Server Programming 2nd Edition Usama Dar (20)

PDF
0292-introduction-postgresql.pdf
Mustafa Keskin
 
PDF
Postgresql v15.1
Banking at Ho Chi Minh city
 
PDF
Postgresql v14.6 Document Guide
Banking at Ho Chi Minh city
 
PPTX
PostgreSQL- An Introduction
Smita Prasad
 
PDF
Bn 1016 demo postgre sql-online-training
conline training
 
PPTX
Chjkkkkkkkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjj01_The Basics.pptx
MhmdMk10
 
PDF
PostgreSQL - Case Study
S.Shayan Daneshvar
 
PDF
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
PDF
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
PDF
postgresql 16.3(latest version) 2024-25.pdf
ayaankim007
 
PDF
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
mowwoiq538
 
PDF
Business logic with PostgreSQL and Python
Hubert Piotrowski
 
PDF
Postgresql quick guide
Ashoka Vanjare
 
PDF
Postgresql 9.3-a4
Mayank Kothawade
 
ODP
Introduction to PostgreSQL
Jim Mlodgenski
 
PDF
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
bligesilva28
 
PDF
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
PDF
PostgreSQL Prologue
Md. Golam Hossain
 
PPTX
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
Reactive.IO
 
PPTX
PostgreSQL Database Slides
metsarin
 
0292-introduction-postgresql.pdf
Mustafa Keskin
 
Postgresql v15.1
Banking at Ho Chi Minh city
 
Postgresql v14.6 Document Guide
Banking at Ho Chi Minh city
 
PostgreSQL- An Introduction
Smita Prasad
 
Bn 1016 demo postgre sql-online-training
conline training
 
Chjkkkkkkkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjj01_The Basics.pptx
MhmdMk10
 
PostgreSQL - Case Study
S.Shayan Daneshvar
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Citus Data
 
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
postgresql 16.3(latest version) 2024-25.pdf
ayaankim007
 
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
mowwoiq538
 
Business logic with PostgreSQL and Python
Hubert Piotrowski
 
Postgresql quick guide
Ashoka Vanjare
 
Postgresql 9.3-a4
Mayank Kothawade
 
Introduction to PostgreSQL
Jim Mlodgenski
 
PostgreSQL 9 Administration Cookbook - Second Edition Simon Riggs
bligesilva28
 
Beyond Postgres: Interesting Projects, Tools and forks
Sameer Kumar
 
PostgreSQL Prologue
Md. Golam Hossain
 
PL/pgSQL - An Introduction on Using Imperative Programming in PostgreSQL
Reactive.IO
 
PostgreSQL Database Slides
metsarin
 

Recently uploaded (20)

PDF
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
PPTX
Photo chemistry Power Point Presentation
mprpgcwa2024
 
PDF
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
PDF
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
PDF
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
PPTX
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
PPTX
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
PDF
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
PPTX
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
PDF
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
PDF
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
PDF
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
PDF
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
PPTX
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
PPTX
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
PPTX
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
PPTX
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
PPTX
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
PPTX
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
PDF
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
Photo chemistry Power Point Presentation
mprpgcwa2024
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
ECONOMICS, DISASTER MANAGEMENT, ROAD SAFETY - STUDY MATERIAL [10TH]
SHERAZ AHMAD LONE
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Public Health For The 21st Century 1st Edition Judy Orme Jane Powell
trjnesjnqg7801
 
English 3 Quarter 1_LEwithLAS_Week 1.pdf
DeAsisAlyanajaneH
 
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
F-BLOCK ELEMENTS POWER POINT PRESENTATIONS
mprpgcwa2024
 
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
LDMMIA Shop & Student News Summer Solstice 25
LDM & Mia eStudios
 
Ad

PostgreSQL Server Programming 2nd Edition Usama Dar

  • 1. Visit https://ebookultra.com to download the full version and explore more ebooks PostgreSQL Server Programming 2nd Edition Usama Dar _____ Click the link below to download _____ https://ebookultra.com/download/postgresql-server- programming-2nd-edition-usama-dar/ Explore and download more ebooks at ebookultra.com
  • 2. Here are some suggested products you might be interested in. Click the link to download PostgreSQL 2nd Edition Korry Douglas https://ebookultra.com/download/postgresql-2nd-edition-korry-douglas/ Professional SQL Server 2005 Programming Robert Vieira https://ebookultra.com/download/professional-sql- server-2005-programming-robert-vieira/ Beginning Databases with PostgreSQL From Novice to Professional 2nd Edition Matthew https://ebookultra.com/download/beginning-databases-with-postgresql- from-novice-to-professional-2nd-edition-matthew/ PostgreSQL Cookbook 1st Edition Chitij Chauhan https://ebookultra.com/download/postgresql-cookbook-1st-edition- chitij-chauhan/
  • 3. Learning PostgreSQL Create develop and manage relational databases in real world applications using PostgreSQL 1st Edition Juba https://ebookultra.com/download/learning-postgresql-create-develop- and-manage-relational-databases-in-real-world-applications-using- postgresql-1st-edition-juba/ Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson https://ebookultra.com/download/programming-microsoft-sql- server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick- dobson/ Building Bluetooth Low Energy Systems 1st Edition Muhammad Usama Bin Aftab https://ebookultra.com/download/building-bluetooth-low-energy- systems-1st-edition-muhammad-usama-bin-aftab/ Computer Networks An Open Source Approach 1st Edition Ying-Dar Lin https://ebookultra.com/download/computer-networks-an-open-source- approach-1st-edition-ying-dar-lin/ Server study guide 2nd ed Edition Brad Hryhoruk https://ebookultra.com/download/server-study-guide-2nd-ed-edition- brad-hryhoruk/
  • 5. PostgreSQL Server Programming 2nd Edition Usama Dar Digital Instant Download Author(s): Usama Dar, Hannu Krosing, JimMlodgenski, Kirk Roybal ISBN(s): 9781783980581, 1783980583 Edition: 2 File Details: PDF, 2.28 MB Year: 2015 Language: english
  • 9. Table of Contents PostgreSQL Server Programming Second Edition Credits About the Authors About the Reviewers www.PacktPub.com Support files, eBooks, discount offers, and more Why subscribe? Free access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 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
  • 10. 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 extensibility Caching Wrapping up – why program in the server? Performance Ease of maintenance Improved productivity Simple ways to tighten security Summary 2. Server Programming Environments Cost of acquisition Availability of developers Licensing Predictability Community Procedural languages Third-party tools Platform compatibility Application design Databases are considered harmful Encapsulation What does PostgreSQL offer? Data locality More basics Transactions General error reporting and error handling
  • 11. User-defined functions Other parameters More control Summary 3. Your First PL/pgSQL Function Why PL/pgSQL? The structure of a PL/pgSQL function Accessing function arguments Conditional expressions Loops with counters Statement termination Looping through query results PERFORM versus SELECT Looping Through Arrays Returning a record Acting on the function’s results Summary 4. Returning Structured Data Sets and arrays Returning sets Returning a set of integers Using a set returning function Functions based on views OUT parameters and records OUT parameters Returning records Using RETURNS TABLE Returning with no predefined structure Returning SETOF ANY Variadic argument lists A summary of the RETURN SETOF variants
  • 12. Returning cursors Iterating over cursors returned from another function Wrapping up of functions returning cursors Other ways to work with structured data Complex data types for the modern world – XML and JSON XML data type and returning data as XML from functions Returning data in the JSON format Summary 5. PL/pgSQL Trigger Functions Creating the trigger function Creating the trigger Working on a simple “Hey, I’m called” trigger The audit trigger Disallowing DELETE Disallowing TRUNCATE Modifying the NEW record The timestamping trigger The immutable fields trigger Controlling when a trigger is called Conditional triggers Triggers on specific field changes Visibility Most importantly – use triggers cautiously! Variables passed to the PL/pgSQL TRIGGER function Summary 6. PostgreSQL Event Triggers Use cases for creating event triggers Creating event triggers Creating an audit trail Preventing schema changes A roadmap of event triggers
  • 13. Summary 7. Debugging PL/pgSQL Manual debugging with RAISE NOTICE Throwing exceptions Logging to a file The advantages of RAISE NOTICE The disadvantages of RAISE NOTICE Visual debugging Installing the debugger Installing the debugger from the source Installing pgAdmin3 Using the debugger The advantages of the debugger The disadvantages of the debugger Summary 8. Using Unrestricted Languages Are untrusted languages inferior to trusted ones? Can you use untrusted languages for important functions? Will untrusted languages corrupt the database? Why untrusted? Why PL/Python? Quick introduction to PL/Python A minimal PL/Python function Data type conversions Writing simple functions in PL/Python A simple function Functions returning a record Table functions Running queries in the database Running simple queries Using prepared queries
  • 14. Caching prepared queries Writing trigger functions in PL/Python Exploring the inputs of a trigger A log trigger Constructing queries Handling exceptions Atomicity in Python Debugging PL/Python Using plpy.notice() to track the function’s progress Using assert Redirecting sys.stdout and sys.stderr Thinking out of the “SQL database server” box Generating thumbnails when saving images Sending an e-mail Listing directory contents Summary 9. Writing Advanced Functions in C The simplest C function – return (a + b) add_func.c Version 0 call conventions Makefile CREATE FUNCTION add(int, int) add_func.sql.in Summary for writing a C function Adding functionality to add(int, int) Smart handling of NULL arguments Working with any number of arguments Basic guidelines for writing C code Memory allocation Use palloc() and pfree() Zero-fill the structures
  • 15. Include files Public symbol names Error reporting from C functions “Error” states that are not errors When are messages sent to the client? Running queries and calling PostgreSQL functions A sample C function using SPI Visibility of data changes More info on SPI_* functions Handling records as arguments or returned values Returning a single tuple of a complex type Extracting fields from an argument tuple Constructing a return tuple Interlude – what is Datum? Returning a set of records Fast capturing of database changes Doing something at commit/rollback Synchronizing between backends Writing functions in C++ Additional resources for C Summary 10. Scaling Your Database with PL/Proxy Creating a simple single-server chat Dealing with success – splitting tables over multiple databases What expansion plans work and when? Moving to a bigger server Master-slave replication – moving reads to slave Multimaster replication Data partitioning across multiple servers Splitting the data PL/Proxy – the partitioning language
  • 16. Installing PL/Proxy The PL/Proxy language syntax CONNECT, CLUSTER, and RUN ON SELECT and TARGET SPLIT – distributing array elements over several partitions The distribution of data Configuring the PL/Proxy cluster using functions Configuring the PL/Proxy cluster using SQL/MED Moving data from the single to the partitioned database Connection Pooling Summary 11. PL/Perl – Perl Procedural Language When to use PL/Perl Installing PL/Perl A simple PL/Perl function Passing and returning non-scalar types Writing PL/Perl triggers Untrusted Perl Summary 12. PL/Tcl – Tcl Procedural Language Installing PL/Tcl A simple PL/Tcl function Null checking with Strict functions The parameter format Passing and returning arrays Passing composite-type arguments Accessing databases Writing PL/Tcl triggers Untrusted Tcl Summary 13. Publishing Your Code as PostgreSQL Extensions
  • 17. When to create an extension Unpackaged extensions Extension versions The .control file Building an extension Installing an extension Viewing extensions Publishing your extension Introduction to PostgreSQL Extension Network Signing up to publish your extension Creating an extension project the easy way Providing the metadata about the extension Writing your extension code Creating the package Submitting the package to PGXN Installing an extension from PGXN Summary 14. PostgreSQL as an Extensible RDBMS What can’t be extended? Creating a new operator Overloading an operator Optimizing operators COMMUTATOR NEGATOR Creating index access methods Creating user-defined aggregates Using foreign data wrappers Summary Index
  • 21. PostgreSQL Server Programming Second Edition Copyright © 2015 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2013 Second edition: February 2015 Production reference: 1210215 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78398-058-1 www.packtpub.com
  • 23. Credits Authors Usama Dar Hannu Krosing Jim Mlodgenski Kirk Roybal Reviewers Stephen Frost Rick van Hattem Vibhor Kumar Jeff Lawson Mariano Reingart Julien Tachoires Commissioning Editor Usha Iyer Acquisition Editors Antony Lowe Meeta Rajani Sam Wood Content Development Editor Adrian Raposo Technical Editors Mrunmayee Patil Chinmay Puranik Copy Editors Dipti Kapadia Aarti Saldanha Project Coordinator Kinjal Bari Proofreaders Maria Gould
  • 24. Linda Morris Indexer Monica Ajmera Mehta Production Coordinator Nitesh Thakur Cover Work Nitesh Thakur
  • 26. About the Authors Usama Dar is a seasoned software developer and architect. During his 14 years’ career, he has worked extensively with PostgreSQL and other database technologies. He worked on PostgreSQL internals extensively while he was working for EnterpriseDB. Currently, he lives in Munich where he works for Huawei’s European Research Center. He designs the next generation of high-performance database systems based on open source technologies, such as PostgreSQL, which are used under high workloads and strict performance requirements. Hannu Krosing was a PostgreSQL user before it was rewritten to use SQL as its main query language in 1995. Therefore, he has both the historic perspective of its development, as well as almost 20 years of experience in using it to solve various real-life problems. He was the first database administrator and database architect at Skype, where he invented the sharding language PL/Proxy that allows you to scale the user database in order to work with billions of users. After he left Skype at the end of 2006—about a year after it was bought by eBay—he has been working as a PostgreSQL consultant with 2ndQuadrant, the premier PostgreSQL consultancy with a global reach and local presence in most parts of the world. He has coauthored PostgreSQL 9 Administration Cookbook, Packt Publishing, together with one of the main PostgreSQL developers, Simon Riggs. I want to sincerely thank my wife, Evelyn, for her support while writing this book. Jim Mlodgenski is the CTO of OpenSCG, a professional services company focused on leveraging open source technologies for strategic advantage. He was formerly the CEO of StormDB, a database cloud company focused on horizontal scalability. Prior to StormDB, he has held highly technical roles at Cirrus Technology, Inc., EnterpriseDB, and Fusion Technologies. Jim is also a fervent advocate of PostgreSQL. He is on the board of the United States PostgreSQL Association as well as a part of the organizing teams of the New York PostgreSQL User Group and Philadelphia PostgreSQL User Group. Kirk Roybal has been an active member of the PostgreSQL community since 1998. He has helped organize user groups in Houston, Dallas, and Bloomington, IL. He has mentored many junior database administrators and provided cross-training to senior database engineers. He has provided solutions using PostgreSQL for reporting, business intelligence, data warehousing, applications, and development support. He saw the scope of PostgreSQL when his first small-scale business customer asked for a web application. At that time, competitive database products were either extremely immature or cost prohibitive. Kirk has stood by his choice of PostgreSQL for many years now. His expertise is founded on keeping up with features and capabilities as they become available.
  • 27. Writing a book has been a unique experience for me. Many people fantasize about it, few start one, and even fewer get to publication. I am proud to be part of a team that actually made it to the book shelf (which itself is a diminishing breed). Thanks to Sarah Cullington from Packt Publishing for giving me a chance to participate in the project. I believe that the PostgreSQL community will be better served by this information, and I hope that they receive this as a reward for the time that they have invested in me over the years. A book only has the value that the readers give it. Thank you to the PostgreSQL community for all the technical, personal, and professional development help you have provided. The PostgreSQL community is a great bunch of people, and I have enjoyed the company of many of them. I hope to contribute more to this project in the future, and I hope you find my contributions as valuable as I find yours. Thank you to my family for giving me a reason to succeed and for listening to the gobbledygook and nodding appreciatively. Have you ever had your family ask you what you were doing and answered them with a function? Try it. No, then again, don’t try it. They may just have you involuntarily checked in somewhere.
  • 29. About the Reviewers Stephen Frost is a major contributor and committer to PostgreSQL, who has been involved with PostgreSQL since 2002, and has developed features such as the role system and column-level privileges. He is the chief technology officer at Crunchy Data Solutions, Inc., the PostgreSQL company for Secure Enterprises. He is involved in the advancement of PostgreSQL’s capabilities, particularly in the area of security in order to support the needs of government and financial institutions who have strict security and regulatory requirements. Rick van Hattem is an entrepreneur with a computer science background and a long-time open source developer with vast experience in the C, C++, Python, and Java languages. Additionally, he has worked with most large database servers such as Oracle, MS SQL, and MySQL, but he has been focusing on PostgreSQL since Version 7.4. He is one of the founders of the Fashiolista.com social network, and until recently, he was the CTO. Here, he used PostgreSQL to scale the feeds for millions of users to show that PostgreSQL can hold up to NoSQL solutions, given some tuning and additional tools. After Fashiolista, he worked as a freelance consultant for several companies, including 2ndQuadrant. He is currently the founder of PGMon.com, a monitoring service that analyzes your databases, indexes, and queries to keep them running at peak performance. In addition to analyzing your database settings, the system actively monitors your queries and gives you recommendations to enhance performance. He is also the creator and maintainer of a large number of open source projects, such as pg_query_analyser, pg_cascade_timestamp, QtQuery, Python-Statsd, and Django-Statsd. Vibhor Kumar is a principal system architect at EnterpriseDB who specializes in assisting Fortune 100 companies to deploy, manage, and optimize Postgres databases. He joined EnterpriseDB in 2008 to work with Postgres after several years of working with Oracle systems. He has worked in team leadership roles at IBM Global Services and BMC Software as well as an Oracle database administrator at CMC Ltd. for several years. He has developed expertise in Oracle, DB2, and MongoDB and holds certifications in them. He has experience working with MS SQL Server, MySQL, and data warehousing. He holds a bachelor’s degree in computer science from the University of Lucknow and a master’s degree in computer science from the Army Institute of Management, Kolkata. He is a certified PostgreSQL trainer and holds a professional certification in Postgres Plus Advanced Server from EnterpriseDB. Jeff Lawson has been a fan and user of PostgreSQL since the time he discovered it in 2001. Over the years, he has also developed and deployed applications for IBM DB2, Oracle, MySQL, Microsoft SQL Server, Sybase, and others, but he always prefers PostgreSQL for its balance of features and openness. Much of his experience involves developing for Internet-facing websites/projects that require highly scalable databases with high availability or with provisions for disaster recovery.
  • 30. He currently works as the director of software development for FlightAware, which is an airplane-tracking website that uses PostgreSQL and other open source software to store and analyze the positions of the thousands of flights that are operated worldwide every day. He has extensive experience in software architecture, data security, and network protocol design from the software engineering positions he has held at Univa / United Devices, Microsoft, NASA’s Jet Propulsion Laboratory, and WolfeTech. He is a founder of distributed.net, which pioneered distributed computing in the 1990s, and he continues to serve as the chief of operations and as a member of the board there. He earned a BSc degree in computer science from Harvey Mudd College. He is fond of cattle, holds an FAA private pilot certificate, and owns an airplane based in Houston, Texas. Mariano Reingart lives in Buenos Aires, Argentina, and is a specialist in the software development of applications and libraries (web services, PDF, GUI, replication, and so on) with more than 10 years of experience. Currently, he is the PostgreSQL regional contact for Argentina and a Python Software Foundation member. He is a major contributor to the web2py Python web framework, and now he’s working on the wxWidgets multiplatform GUI toolkit (specifically in the Qt port and Android mobile areas). Also, he has contributed to more than a dozen open source projects, including an interface for Free Electronic Invoice web services (PyAfipWs) and Pythonic replication for PostgreSQL (PyReplica). He has a bachelor’s degree in computer systems analysis, and currently, he’s a master’s candidate for the MSc in free software degree at the Open University of Catalonia. He works on his own funded entrepreneurial venture formed by an open group of independent professionals, dedicated to software development, training, and technical support, focusing on open source tools (GNU/Linux, Python, PostgreSQL, and web2py/wxPython). He has worked for local Python-based companies in large business applications (ERP, SCM, and CRM) and mission critical systems (election counting, electronic voting, and 911 emergency events support). He has contributed to books such as web2py Enterprise Web Framework, Third Edition, and web2py Application Development Cookbook, Packt Publishing, and several Spanish translations of the PostgreSQL official documentation. His full resume is available at http://reingart.blogspot.com/p/resume.html. Julien Tachoires is a PostgreSQL specialist, who works as consultant for the French PostgreSQL company Dalibo. He is the main developer of pg_activity, a top-end software dedicated to follow the PostgreSQL incoming traffic in real time, which is written in Python. I want to thank my employer Dalibo; my wife, Camille; and my son, Arthur.
  • 33. Support files, eBooks, discount offers, and more For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital book library. Here, you can search, access, and read Packt’s entire library of books.
  • 34. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
  • 35. Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
  • 37. Preface This fascinating guide to server programming will take your skills of PostgreSQL to a whole new level. A step-by-step approach with illuminating examples will educate you about the full range of possibilities. You will understand the extension framework of PostgreSQL and leverage it in ways you haven’t even invented yet. You will learn how to write functions and create your own data types, all in your favorite programming language. It is a step-by-step tutorial, with plenty of tips and tricks to kick-start server programming.
  • 38. What this book covers Chapter 1, What Is a PostgreSQL Server?, introduces you to the PostgreSQL server and will set the tone for the rest of the book. It introduces you to the ways in which a PostgreSQL server is extendible, and shows you that it can be treated as a complete software development framework instead of just a database server. Chapter 2, Server Programming Environments, elaborates that PostgreSQL is built to handle user needs, but more importantly, it is built not to change underneath users in the future. It will touch upon the environments and will highlight some of the important things to be kept in mind when programming on the server in PostgreSQL. Chapter 3, Your First PL/pgSQL Function, builds the foundations by demonstrating how to write simple PL/pgSQL functions. Chapter 4, Returning Structured Data, builds on the knowledge of writing PL/pgSQL functions and demonstrates how to write functions that return a set of values such as rows, arrays, and cursors. Chapter 5, PL/pgSQL Trigger Functions, discusses how to write PL/pgSQL functions that are used to write trigger logic. It also discusses the various types of triggers available in PostgreSQL and the options that a database developer has when writing such functions. Chapter 6, PostgreSQL Event Triggers, discusses PostgreSQL’s event trigger functionality. Event triggers are fired when running a DDL operation on a table. This chapter discusses the various possibilities and options of creating event triggers and their limitations in PostgreSQL. Chapter 7, Debugging PL/pgSQL, elaborates on how to debug PL/pgSQL’s stored procedures and functions in PostgreSQL. This chapter explains how to install the debugger plugin and use the pgAdmin debugger console. Chapter 8, Using Unrestricted Languages, explains the differences between restricted and unrestricted PostgreSQL languages. This chapter uses PL/Python as an example and demonstrates the examples of both restricted and unrestricted functions in PL/Python. Chapter 9, Writing Advanced Functions in C, explains how to extend PostgreSQL by writing user-defined functions (UDFs) in C. Chapter 10, Scaling Your Database with PL/Proxy, explains the use of a special programming language in PostgreSQL called PL/Proxy and how to use it in order to partition and shard your database. Chapter 11, PL/Perl – Perl Procedural Language, discusses a popular PL language in PostgreSQL called PL/Perl. This chapter uses some simple examples to demonstrate how you can use Perl to write database functions. Chapter 12, PL/Tcl – Tcl Procedural Language, discusses Tcl as a language of choice when writing database functions. It discusses the pros and cons of using Tcl in the database.
  • 39. Chapter 13, Publishing Your Code as PostgreSQL Extensions, discusses how to package and distribute the PostgreSQL extensions. Well-packaged extensions can be easily distributed and installed by other users. This chapter also introduces you to the PostgreSQL Extension Network (PGXN) and shows you how to use it to get the extensions published by other developers. Chapter 14, PostgreSQL as an Extensible RDBMS, discusses more extensibility options in PostgreSQL, such as creating new data types, operators, and index methods.
  • 41. What you need for this book In order to follow this book, you need the following software: PostgreSQL Database Server 9.4 Linux/Unix Operating System Python 2, Perl, and Tcl
  • 43. Who this book is for This book is for moderate to advanced level PostgreSQL database professionals. To get a better understanding of this book, you should have a general experience in writing SQL, a basic idea of query tuning, and some coding experience in a language of your choice.
  • 45. Conventions In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning. Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: “If any of the checks fail, you should do ROLLBACK instead of COMMIT.” A block of code is set as follows: CREATE TABLE accounts(owner text, balance numeric, amount numeric); INSERT INTO accounts VALUES ('Bob',100); INSERT INTO accounts VALUES ('Mary',200); When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold: CREATE OR REPLACE FUNCTION fibonacci_seq(num integer) RETURNS SETOF integer AS $$ DECLARE a int := 0; b int := 1; BEGIN IF (num <= 0) THEN RETURN; END IF; RETURN NEXT a; LOOP EXIT WHEN num <= 1; RETURN NEXT b; num = num - 1; SELECT b, a + b INTO a, b; END LOOP; END; $$ LANGUAGE plpgsql; Any command-line input or output is written as follows: $ psql -c "SELECT 1 AS test" New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: “Enter some values into the columns, as seen in the preceding screenshot, and click on the Debug button.” Note Warnings or important notes appear in a box like this. Tip Tips and tricks appear like this.
  • 48. Reader feedback Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail <[email protected]>, and mention the book’s title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
  • 50. Customer support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
  • 51. Another Random Scribd Document with Unrelated Content
  • 52. Hectors, street bullies. Since the Restoration, we have had a succession of street brawlers, as the Muns, the Tityre Tus, the Hectors, the Scourers, the Nickers, the Hawcabites, and, lastly, the Mohawks, worst of them all. Heeltap (Crispin), a cobbler, and one of the corporation of Garratt, of which Jerry Sneak is chosen mayor,—S. Foote, The Mayor of Garratt (1763). Heep (Uriah), a detestable sneak, who is everlastingly forcing on one’s attention that he is so ’umble. Uriah is Mr. Wickfield’s clerk, and, with all his ostentatious ’umility, is most designing, malignant, and intermeddling. His infamy is dragged to light by Mr. Micawber. Herr Piper, “representative in New Swedeland of the Great Gustavus, the bulwark of the Protestant Religion,” and a mighty stickler for forms and ceremonies appertaining to the office.—James Kirke Paulding, Königsmarke (1823). Heidelberg (Mrs.), the widow of a wealthy Dutch merchant, who kept her brother’s house (Mr. Sterling, a city merchant). She was very vulgar, and “knowing the strength of her purse, domineered on the credit of it.” Mrs. Heidelberg had most exalted notions “of the quality,” and a “perfect contempt for everything that did not smack of high life.” Her English was certainly faulty, as the following specimens will show:—farden, wolgar, spurrit, pertest, Swish, kivers, purliteness, etc. She spoke of a pictur by Raphael-Angelo, a po-shay, dish-abille, parfect naturals [idiots], most genteelest, and so on. When thwarted in her overbearing ways, she threatened to leave the house and go to Holland to live with her husband’s cousin, Mr. Vanderspracken.—Colman and Garrick, The Clandestine Marriage (1766). Heimdall (2 syl.), in Celtic mythology, was the son of nine virgin sisters. He dwelt in the celestial Fort Himinsbiorg, under the extremity of the rainbow. His ear was so acute that he could hear
  • 53. “the wool grow on the sheep’s back, and the grass in the meadows.” Heimdall was the watch or sentinel of Asgard (Olympus), and even in his sleep was able to see everything that happened (See Fine-ear). Heimdall’s Horn. At the end of the world, Heimdall will wake the gods with his horn, when they will be attacked by Muspell, Loki, the wolf Fenris, and the serpent Jormunsgandar. And much he talked of... And Heimdal’s horn and the day of doom. Longfellow, The Wayside Inn (interlude, 1631). Heinrich (Poor), or “Poor Henry,” the hero and title of a poem by Hartmann von der Aue [Our]. Heinrich was a rich nobleman, struck with leprosy, and was told he would never recover till some virgin of spotless purity volunteered to die on his behalf. As Heinrich neither hoped nor even wished for such a sacrifice, he gave the main part of his possessions to the poor, and went to live with a poor tenant farmer, who was one of his vassals. The daughter of this farmer heard by accident on what the cure of the leper depended, and went to Salerno to offer herself as the victim. No sooner was the offer made than the lord was cured, and the damsel became his wife (twelfth century). ⁂ This tale forms the subject of Longfellow’s Golden Legend (1851). Heir-at-Law. Baron Dubeley being dead, his “heir-at-law” was Henry Morland, supposed to be drowned at sea, and the next heir was Daniel Dowlas, a chandler of Gosport. Scarcely had Daniel been raised to his new dignity, when Henry Morland, who had been cast on Cape Breton, made his appearance, and the whole aspect of affairs was changed. That Dowlas might still live in comfort, suitable to his limited ambition, the heir of the barony settled on him a small life annuity.—G. Colman, Heir-at-law, (1797).
  • 54. Hel´a, queen of the dead. She is daughter of Loki and Angurbo ´da (a giantess). Her abode, called Helheim, was a vast castle in Niflheim, in the midst of eternal snow and darkness. Down the yawning steep he rode, That leads to Hela’s drear abode. Gray, Descent of Odin (1757). Helen, wife of Menelāos of Sparta. She eloped with Paris, a Trojan prince, while he was the guest of the Spartan king. Menelaos, to avenge this wrong, induced the allied armies of Greece to invest Troy; and after a siege of ten years, the city was taken and burnt to the ground. ⁂ A parallel incident occurred in Ireland. Dervorghal, wife of Tiernan O’Ruark, an Irish chief who held the county of Leitrim, eloped with Dermod M’Murchad, prince of Leinster. Tiernan induced O’Connor, king of Connaught, to avenge this wrong. So O’Connor drove Dermod from his throne. Dermod applied to Henry II. of England, and this was the incident which brought about the conquest of Ireland (1172).—Leland, History of Ireland (1773). Helen, the heroine of Miss Edgeworth’s novel of the same name. This was her last and most popular tale (1834). Helen, cousin of Modus, the bookworm. She loved her cousin, and taught him there was a better “art of love” than that written by Ovid. —S. Knowles, The Hunchback (1831). Helen Lorrington. Accomplished young widow, Anne Douglas’s intimate friend. She is the semi-betrothed of Ward Heathcote, who nevertheless considers himself free to woo Anne. After many complications, Heathcote, believing Anne already married becomes Helen’s husband. The latter is murdered a year or two later under circumstances that cast suspicion upon Heathcote. Through Anne’s efforts and testimony he is acquitted, and finally marries her.— Constance Fennimore Woolson, Anne (1882).
  • 55. Helen (Lady), in love with Sir Edward Mortimer. Her uncle insulted Sir Edward in a county assembly, struck him down, and trampled on him. Sir Edward, returning home, encountered the drunken ruffian and murdered him. He was tried for the crime, and acquitted “without a stain upon his character;” but the knowledge of the deed preyed upon his mind so that he could not marry the niece of the murdered man. After leading a life of utter wretchedness, Sir Edward told Helen that he was the murderer of her uncle, and died.—G. Colman, The Iron Chest (1796). Helen [Mowbray], in love with Walsingham. “Of all grace the pattern—person, feature, mind, heart, everything as nature had essayed to frame a work where none could find a flaw.” Allured by Lord Athunree to a house of ill-fame, under pretence of doing a work of charity, she was seen by Walsingham as she came out, and he abandoned her as a wanton. She then assumed male attire, with the name of Eustace. Walsingham became her friend, was told that Eustace was Helen’s brother, and finally discovered that Eustace was Helen herself. The mystery being cleared up, they became man and wife.—S. Knowles, Woman’s Wit, etc. (1838). Helen’s Fire (feu d’Hélène), a comazant called “St. Helme’s” or “St. Elmo’s fire” by the Spaniards; the “fires of St. Peter and St. Nicholas” by the Italians; and “Castor and Pollux” by the ancient Romans. This electric light will sometimes play about the masts of ships. If only one appears, foul weather may be looked for; but if two or more flames appear, the worst of the storm is over. Helen (Rolleston), heroine of Charles Reade’s novel, Foul Play. She is betrothed to Wardlaw, chief villain of the story, and sets out on a sea-voyage to restore her health; is shipwrecked and cast on an island with Herbert Penfold. After their return to England, she rights the wronged Penfold, and punishes Wardlaw. Helen, wife of John Ward, Preacher. Her husband is a Calvinist of a pronounced type; she a believer in Universal Salvation. The
  • 56. spiritual agonies to which they are subjected by the difference in creeds, separate them for a while and are the moving cause of John Ward’s death. He passes away, convinced that “his death is to be the climax of God’s plans for her.”—Margaret Deland, John Ward, Preacher (1888). Hel´ena (St.), daughter of Coel, duke Colchester, and afterwards king of Britain. She married Constantius (a Roman senator, who succeeded “Old King Cole”), and became the mother of Constantine the Great. Constantius died at York (a.d. 306). Helena is said to have discovered at Jerusalem the sepulchre and cross of Jesus Christ.— Geoffrey, British History v. 6 (1142). ⁂ This legend is told of the Colchester arms, which consist of a cross and three crowns (two atop and one at the foot of the cross). At a considerable depth beneath the surface of the earth were found three crosses which were instantly recognized as those on which Christ and the two thieves had suffered death. To ascertain which was the true cross, a female corpse was placed on all three alternately; the two first tried produced no effect, but the third instantly reanimated the body.—J. Brady, Clavis Calendaria, 181. Herself in person went to seek that holy cross Whereon our Saviour died, which found, as it was sought; From Salem unto Rome triumphantly she brought. Drayton, Polyolbion, viii. (1612). Helena, only daughter of Gerard de Narbon, the physician. She was left under the charge of the countess of Rousillon, whose son Bertram she fell in love with. The king sent for Bertram to the palace, and Helena, hearing the king was ill, obtained permission of the countess to give him a prescription left by her late father. The medicine cured the king, and the king, in gratitude, promised to make her the wife of any one of his courtiers that she chose. Helena selected Bertram, and they were married; but the haughty count, hating the alliance, left France, to join the army of the duke of Florence. Helena, in the mean time, started on a pilgrimage to the shrine of St. Jacques le Grand, carrying with her a letter from her
  • 57. husband, stating that he would never see her more “till she could get the ring from off his finger.” On her way to the shrine, she lodged at Florence with a widow, the mother of Diana, with whom Bertram was wantonly in love. Helena was permitted to pass herself off as Diana, and received his visits, in one of which they exchanged rings. Both soon after this returned to the Countess de Rousillon, where the king was, and the king, seeing on Bertram’s finger the ring which he gave to Helena, had him arrested on suspicion of murder. Helena now explained the matter, and all was well, for all ended well.—Shakespeare, All’s Well that ends Well (1598). Helena is a young woman, seeking a man in marriage. The ordinary laws of courtship are reversed, the habitual feelings are violated; yet with such exquisite address this dangerous subject is handled that Helena’s forwardness loses her no honor. Delicacy dispenses with her laws in her favor.—C. Lamb. Helena, a young Athenian lady, in love with Demētrius. She was the playmate of Her´mia, with whom she grew up, as “two cherries on one stalk.” Egēus (3 syl.), the father of Hermia, promised his daughter in marriage to Demetrius; but when Demetrius saw that Hermia loved Lysander, he turned to Helena, who loved him dearly, and married her.—Shakespeare, Midsummer Night’s Dream (1592). Hel´inore (Dame), wife of Malbecco, who was jealous of her, and not without cause. When Sir Paridel, Sir Sat´yrane (3 syl.), and Britomart (as the squire of Dames) took refuge in Malbecco’s house, Dame Helinore and Sir Paridel had many “false belgardes” at each other, and talked love with glances which needed no interpreter. Helinore, having set fire to the closet where Malbecco kept his treasures, eloped with Paridel, while the old miser stopped to put out the fire. Paridel soon tired of the dame, and cast her off, leaving her to roam whither she listed. She was taken up by the satyrs, who made her their dairy-woman, and crowned her queen of the May.— Spenser, Faëry Queen, iii. 9, 10 (1590). Viridi colore est gemma helitropion, non ita acuto sed nubilo magis et represso, stellis puniceis superspersa. Causa nominis de effectu lapidis est et potestate. Dejecta in labris æneis radios solis mutat sanguineo repercussu, utraque aqua
  • 58. splendorem aëris abjicit et avertit. Etiam illud posse dicitur, ut herba ejusdem nominis mixta et præcantationibus legitimis consecrata eum, a quocunque gestabitur, subtrahat visibus obviorum.—Solinus, Geog., xl. Helisane de Crenne, contemporary with Pâquier. She wrote her own biography, including the “history of her own death.”—Angoisses Doloureuses (Lyons, 1546). Hel Keplein, a mantle of invisibility, belonging to the dwarf-king Laurin. (See Invisibility.)—The Heldenbuch (thirteenth century). Hell, according to Mohammedan belief is divided into seven compartments: (1) for Mohammedans, (2) for Jews, (3) for Christians, (4) for Sabians, (5) for Magians, (6) for idolaters, (7) for hypocrites. All but idolaters and unbelievers will be in time released from torment. Hell, Dantê says, is a vast funnel divided into eight circles, with ledges more or less rugged. Each circle, of course, is narrower that the one above, and the last goes down to the very centre of the earth. Before the circles begin, there is a neutral land and a limbo. In the neutral land wander those not bad enough for hell nor good enough for heaven; in the limbo, those who knew no sin but were not baptized Christians. Coming then to hell proper, circle 1, he says, is compassed by the river Achĕron, and in this division of inferno dwell the spirits of the heathen philosophers. Circle 2 is presided over by Minos, and here are the spirits of those guilty of carnal and sinful love. Circle 3 is guarded by Cerbĕrus, and this is the region set apart for gluttons. Circle 4, presided over by Plutus, is the realm of the avaricious. Circle 5 contains the Stygian Lake, and here flounder in deep mud those who in life put no restraint on their anger. Circle 6 (in the city of Dis) is for those who did violence to man by force or fraud. Circle 7 (in the city of Dis) is for suicides. Circle 8 (also in the city of Dis) is for blasphemers and heretics. After the eight circles comes the ten pits or chasms of Malebolgê (4 syl.), the last of which is the centre of the earth, and here he says is the frozen river of Cocy´tus. (See Inferno.)
  • 59. Hellespont. Leander used to swim across the Hellespont to visit Hero, a priestess of Sestos. Lord Byron and Lieutenant Ekenhead repeated the feat and accomplished it in seventy minutes, the distance being four miles (allowing for drifting). He could perhaps have passed the Hellespont, As once (a feat on which ourselves we prided) Leander, Mr. Ekenhead, and I did. Byron, Don Juan, ii. 105 (1819). Hellica´nus, the able and honest minister of Per´iclês, to whom he left the charge of Tyre during his absence. Being offered the crown, Hellicānus nobly declined the offer, and remained faithful to the prince throughout.—Shakespeare, Pericles, Prince of Tyre (1608). Helmet of Invisibility. The helmet of Perseus (2 syl.) rendered the wearer invisible. This was in reality the “Helmet of Ha´dès,” and after Perseus had slain Medu´sa he restored it, together with the winged sandals and magic wallet. The “gorgon’s head” he presented to Minerva, who placed it in the middle of her ægis. (See Invisibility.) ⁂ Mambrīno’s helmet had the same magical power, though Don Quixote, even in his midsummer madness, never thought himself invisible when he donned the barber’s basin. Heloise. La Nouvelle Héloïse, a romance by Jean Jacques Rousseau (1761). He´mera, sister of Prince Memnon, mentioned by Dictys Cretensis. Milton, in his Il Penseroso, speaks of “Prince Memnon’s sister” (1638). Hem´junah, princess of Cassimir´, daughter of the Sultan Zebene´zer; betrothed at the age of 13 to the prince of Georgia. As Hemjunah had never seen the prince, she ran away to avoid a forced marriage, and was changed by Ulin, the enchanter, into a toad. In this form she became acquainted with Misnar, sultan of India, who had likewise been transformed into a toad by Ulin. Misnar
  • 60. was disenchanted by a dervise, and slew Ulin; whereupon the princess recovered her proper shape, and returned home. A rebellion broke out in Cassimir, but the “angel of death” destroyed the rebel army, and Zebenezer was restored to his throne. His surprise was unbounded when he found that the prince of Georgia and the sultan of India were one and the same person; and Hemjunah said, “Be assured, O Sultan, that I shall not refuse the hand of the prince of Georgia, even if my father commands my obedience.”—Sir C. Morell [J. Ridly] Tales of the Genii (“Princess of Cassimir,” vii., 1751). Hemlock. Socratês the Wise and Phocion the Good were both by the Athenians condemned to death by hemlock juice, Socratês at the age of 70 (B.C. 399) and Phocion at the age of 85 (B.C. 317). Hemps´kirke (2 syl.), a captain serving under Wolfort, the usurper of the earldom of Flanders.—Beaumont and Fletcher, The Beggar’s Bush (1622). Henderson (Rodney syl.), representative American who makes money by unscrupulous operations in stocks.—Charles Dudley Warner, A Little Journey in the World (1889). Henderson (Elias) syl., chaplain at Lochleven Castle.—Sir W. Scott, The Abbot (time, Elizabeth). Henneberg (Count syl.). One day a beggar-woman asked Count Henneberg’s wife for alms. The countess twitted her for carrying twins, whereupon the woman cursed her, with the assurance that “her ladyship should be the mother of 365 children.” The legend says that the countess bore them at one birth, but none of them lived any length of time. All the girls were named Elizabeth, and all the boys John. They are buried, we are told, at the Hague. Henrietta Maria, widow of King Charles I., introduced in Sir W. Scott’s Peveril of the Peak (1823).
  • 61. Henrietta Street, Cavendish Square, London, is so called in compliment to Henrietta Cavendish, daughter of John Holles, duke of Newcastle, and wife of Edward, second earl of Oxford and Mortimer. From these come “Edward Street,” “Henrietta Street,” “Cavendish Square,” and “Holles Street.” Henriette (3 syl.), daughter of Chrysale (2 syl.) and Philaminte (3 syl.). She is in love with Clitandre, and ultimately becomes his wife. Philaminte, who is a blue-stocking, wants Henriette to marry Trissotin, a bel esprit; and Armande the sister, also a bas bleu, thinks that Henriette ought to devote her life to science and philosophy; but Henriette loves woman’s work far better, and thinks that her natural province is domestic life, with wifely and motherly duties. Her father Chrysale takes the same views of woman’s life as his daughter Henriette, but he is quite under the thumb of his strong- minded wife. However love at last prevails, and Henriette is given in marriage to the man of her choice. The French call Henriette “the type of a perfect woman,” i.e., a thorough woman.—Molière, Les Femmes Savantes (1672). Henrique (Don), an uxorious lord, cruel to his younger brother Don Jamie. Don Henrique is the father of Asca´nio, and the supposed husband of Violan´te (4 syl.).—Beaumont and Fletcher, The Spanish Curate (1622). Henri, boy, four years old, who, finding his friend “the doctor” bound naked to a trestle to which he was strapped by pirates, follows his directions and gnaws asunder the strips of raw hide tying the victim down, and frees him.—Henry Augustus Wise, U.S.N., Captain Brand of the Schooner Centipede (1864). Henry, a soldier engaged to Louisa. Some rumors of gallantry to Henry’s disadvantage having reached the village, he is told that Louisa is about to be married to another. In his despair he gives himself up as a deserter, and is condemned to death. Louisa now goes to the king, explains to him the whole matter, obtains her
  • 62. sweetheart’s pardon, and reaches the jail just as the muffled drum begins to beat the death march.—Dibdin, The Deserter (1770). Henry, son of Sir Philip Blandford’s brother. Both the brothers loved the same lady, but the younger marrying her, Sir Philip, in his rage, stabbed him, as it was thought, mortally. In due time, the young “widow” had a son (Henry) a very high-minded, chivalrous young man, greatly beloved by every one. After twenty years, his father re-appeared under the name of Morrington, and Henry married his cousin Emma Blandford.—Thom. Morton, Speed the Plough (1798). Henry (Poor), prince of Hoheneck, in Bavaria. Being struck with leprosy, he quitted his lordly castle, gave largely to the poor, and retired to live with a small cottage farmer named Gottlieb [Got.leeb], one of his vassals. He was told that he would never be cured till a virgin, chaste and spotless, offered to die on his behalf. Elsie, the farmer’s daughter, offered herself, and after great resistance, the prince accompanied her to Salerno to complete the sacrifice. When he arrived at the city, either the exercise, the excitement, or the charm of some relic, no matter what, had effected an entire cure, and when he took Elsie into the cathedral, the only sacrifice she had to make was that of her maiden name for Lady Alicia, wife of Prince Henry of Hoheneck.—Hartmann von der Aue (minnesinger), Poor Henry (twelfth century). ⁂ This tale is the subject of Longfellow’s Golden Legend (1851). Henry (Patrick), Virginian orator, who, in the House of Burgesses, first raised the cry of “Liberty or Death” in the struggle of the American Colonies for Independence. Patrick Henry’s first legal triumph was in November, 1763, in the since famous Parson’s Cause. “In the language of those who heard him on this occasion, ‘he made their blood run cold, and their hair to rise on end ...’” “The jury seem to have been so completely bewildered, that, thoughtless even of the admitted right of the plaintiff, they had scarcely left the bar when they returned with a verdict of one penny damages.”—William Wirt, Life of Patrick Henry (1818).
  • 63. Henry (Prince), Bernardine du Born, arraigned for treason, replies to King Henry’s questions, “Hath reason quite forsook thy breast?” with “My reason failed, my gracious liege, The year Prince Henry died.” The king, smitten by memories of his son, whose chosen intimate Bernardine was, forgives the offender:— “For the dear sake of the dead Go forth—unscathed and free.” Lydia Huntley Sigourney, Poems (1836). Henry II., king of England, introduced by Sir W. Scott, both in The Betrothed and in The Talisman (1825). Henry V., Shakespeare’s drama, founded on The Famous Victories of Henry V.: containing the Honorable Battle of Agincourt. As it is plaide by the Queenes Magesties players, 1598. Shakespeare’s play appeared in print in 1600 (quarto). Henry VI., Shakespeare’s dramas of this reign are founded on The First Part of the Contention betwixt the two Famous Houses of Yorke and Lancaster, with the Death of the Good Duke Humphrey, etc. As it was sundry times acted by the Right Honorable the Earle of Pembroke his Servants, 1600. Another. The True Tragedie of Richard Duke of Yorke, and the Death of Good Henri VI., etc. As it was sundry times acted ... (as above). Henry VIII. and Anne Boleyn. Anne Boleyn was the second wife of Henry VIII. He divorced Katharine of Aragon in order to marry Anne; wearied of her in turn, and had her beheaded in 1536.
  • 64. He´par, the Liver personified, the arch-city in The Purple Island, by Phineas Fletcher. Fully described in canto iii. (1633). Hephæs´tos, the Greek name for Vulcan. The Vulcanic period of geology is that unknown period before the creation of man, when the molten granite and buried metals were upheaved by internal heat, through the overlying strata, sometimes even to the very surface of the earth. The early dawn and dusk of Time. The reign of dateless old Hephæstus. Longfellow, The Golden Legend (1851). Hepzibah (Pyncheon), gentlewoman, reduced to the necessity of keeping a small shop in the ancient homestead. She idolizes her brother Clifford, a melancholy, refined man, who, terrified by an empty threat of his cousin, Judge Pyncheon, flees the house. Hepzibah goes with him. Recovering from their panic, they return in time to avoid the suspicion of having caused the Judge’s sudden death, which makes them rich.—Nathaniel Hawthorne, House of the Seven Gables (1851). Herbert (Sir William), friend of Sir Hugo de Lacy.—Sir W. Scott, The Betrothed (time, Henry II.). Her´culês shot Nessus for offering insult to his wife Dei´-j-a-nī- ra, and the dying centaur told Deijanira that if she dipped in his blood her husband’s shirt, she would secure his love forever. Herculês, being about to offer sacrifice, sent Lichas for the shirt; but no sooner was it warmed by the heat of his body than it caused such excruciating agony that the hero went mad, and seizing Lichas, he flung him into the sea. Herculés Mad is the subject of a Greek tragedy by Eurip´idês, and of a Latin one by Sen´eca.
  • 65. As when Alcīdês ... felt the envenomed robe, and tore, Thro’ pain, up by the roots Thessalian pines, And Lichas from the top of Œta [a mount] threw Into the Euboic Sea [The Archipelago]. Milton, Paradise Lost, ii. 542, etc. [1665]. ⁂ Diodōrus says there were three Herculêses; Cicero recognizes six (three of which were Greeks, one Egyptian, one Cretan, and one Indian); Varro says there were forty-three. Herculés’s Choice. When Herculês was a young man, he was accosted by two women, Pleasure and Virtue, and asked to choose which he would follow. Pleasure promised him all carnal delights, but Virtue promised him immortality. Herculês gave his hand to the latter, and hence led a life of great toil, but was ultimately received amongst the immortals.—Xenophon. ⁂ Mrs. Barbauld has borrowed this allegory, but instead of Herculês has substituted Melissa, “a young girl,” who is accosted by Dissipation and Housewifery. While she is somewhat in doubt which to follow, Dissipation’s mask falls off, and immediately Melissa beholds such a “wan and ghastly countenance,” that she turns away in horror, and gives her hand to the more sober of the two ladies.— Evenings at Home, xix. (1795). Herculês’s Horse, Arion, given him by Adrastos. It had the gift of human speech, and its feet on the right side were those of a man. Herculês’s Pillars, Calpê and Ab´yla, one at Gibraltar and the other at Ceuta (3 syl.). They were torn asunder by Alcīdês on his route to Gadês (Cadiz). Herculês’s Ports: (1) “Herculis Corsani Portus” (now called Porto- Ercolo, in Etruria); (2) “Herculis Liburni Portus” (now called Livorno, i.e. Leghorn); (3) “Herculis Monœci-Portus” (now called Monaco, near Nice).
  • 66. Herculês (The Attic), Theseus (2 syl.), who went about, like Herculês, destroying robbers, and performing most wonderful exploits. Herculês (The Cretan). All the three Idæan Dactyls were so called: viz., Kelmis (“the smelter”), Damnamĕneus (“the hammer”), and Acmon (“the anvil”). Herculês (The Egyptian), Sesostris (fl. B.C. 1500). Another was Som or Chon, called by Pausanias, Macĕris, son of Amon. Herculês (The English), Guy, earl of Warwick (890-958). Warwick ... thou English Herculês. Drayton, Polyolbion, xiii. (1613). Herculês (The Farnesê), a statue, the work of Glykon, copied from one by Lysip´pos, called Farnesê, because formerly in the Farnesê palace in Rome with the Farnesê Bull, the Flora, and the Gladiator. All but the Gladiator are now in the Naples Museum. The Gladiator is in the British Museum. The “Farnesê Herculês” represents the hero exhausted by toil, leaning on his club; and in his left hand, which rests on his back, he holds one of the apples of the Hesperĭdês. ⁂ A copy of this famous statue stands in the Tuileries gardens of Paris. An excellent description of the statue is given by Thomson, in his Liberty, iv. Herculês (The Indian), Dorsănês, who married Pandæa, and became the progenitor of the Indian kings. Belus is sometimes called “The Indian Herculês.” Herculês (The Jewish), Samson (died B.C. 113). Herculês (The Russian), Rustum. Herculês (The Swedish), Starchatĕrus (first Christian century).
  • 67. Hercules of Music, Christoph von Glück (1714-1787). Herculês Secundus. Commŏdus, the Roman emperor, gave himself this title. He was a gigantic idiot, who killed 100 lions, and overthrew 1000 gladiators in the amphitheatre (161, 180-195). Heren-Suge (The), a seven-headed hydra of Basque mythology, like the Deccan cobras. Heretics (Hammer of), Pierre d’Ailly (1350-1425). John Faber is also called “The Hammer of Heretics,” from the title of one of his works (*-1541). Heretics (Scientific). Feargal, bishop of Saltzburg, an Irishman, was denounced as a heretic for asserting the existence of antipodês (*-784). Galileo, the astronomer, was cast into prison for maintaining the “heretical opinion” that the earth moved round the sun (1564-1642). Giordano Bruno was burnt alive for maintaining that matter is the mother of all things (1550-1600). Her´eward (3 syl.), one of the Varangian guard of Alexius Comnēnus, emperor of Greece.—Sir W. Scott, Count Robert of Paris (time, Rufus). Hereward the Wake (or Vigilant), lord of Born, in Lincolnshire. He plundered and burnt the abbey of Peterborough (1070); established his camp in the Isle of Ely, where he was joined by Earl Morcar (1071); he was blockaded for three months by William I., but made his escape with some of his followers. This is the name and subject of one of Kingsley’s novels. Her´iot (Master George), goldsmith to James I.; guardian of Lady Hermionê.—Sir W. Scott, Fortunes of Nigel (time, James I.). Herman, a deaf and dumb boy, jailer of the dungeon of the Giant’s Mount. Meeting Ulrica, he tries to seize her, when a flash of
  • 68. lightning strikes the bridge on which he stands, and Herman is thrown into the torrent.—E. Stirling, The Prisoner of State (1847). Herman (Sir), of Goodalicke, one of the perceptors of the Knights Templars.—Sir W. Scott, Ivanhoe (time, Richard I.). Hermann, the hero of Goethe’s poem Hermann and Dorothea. Goethe tells us that the object of this poem is to “show as in a mirror, the great movements and changes of the world’s stage.” Hermaph´rodite (4 syl.), son of Venus and Mercury. At the age of 15, he bathed in a fountain of Caria, when Sal´macis, the fountain nymph, fell in love with him, and prayed the gods to make the two one body. Her prayers being heard, the two became united into one, but still preserved the double sex. Not that bright spring where fair Hermaphrodite Grew into one with wanton Salmacis ... ... may dare compare with this. Phin. Fletcher, The Purple Island, v. (1633). Hermegild or Hermyngyld, wife of the lord-constable of Northumberland. She was converted by Constance, but was murdered by a knight whose suit had been rejected by the young guest, in order to bring her into trouble. The villainy being discovered, the knight was executed, and Constance married the king, whose name was Alla. Hermegild, at the bidding of Constance, restored sight to a blind Briton.—Chaucer, Canterbury Tales (“Man of Law’s Tale,” 1388). (The word is spelt “Custaunce” 7 times, “Constance” 15 times, and “Constaunce” 17 times, in the tale.) Hermegild, a friend of Oswald, in love with Gartha (Oswald’s sister). He was a man in the middle age of life, of counsel sage, and great prudence. When Hubert (the brother of Oswald) and Gartha wished to stir up a civil war to avenge the death of Oswald, who had been slain in single combat with Prince Gondibert, Hermegild wisely
  • 69. deterred them from the rash attempt, and diverted the anger of the camp by funeral obsequies of a most imposing character. The tale of Gondibert being unfinished, the sequel is not known.—Sir W. Davenant, Gondibert (died 1668). Her´mês (2 syl.), son of Maia; patron of commerce. Akenside makes Hermês say to the Thames, referring to the merchant ships of England: By you [ships] my function and my honored name Do I possess; while o’er the Bætic vale, Or thro’ the towers of Memphis, or the palms By sacred Ganges watered, I conduct The English merchant. Akenside, Hymn to the Naiads (1767). (The Bætis is the Guadalquiver, and the Bætic vale Granāda and Andalucia). Her´mês (2 syl.), the same as Mercury, and applied both to the god and to the metal. Milton calls quicksilver “volatil Hermês.” So when we see the liquid metal fall, Which chemists by the name of Hermes call. Hoole’s Ariosto, viii. Hermês (St.), same as St. Elmo, Suerpo Santo, Castor and Pollux, etc. A comazant or electric light, seen occasionally on ship’s masts. “They shall see the fire which saylors call St. Hermes, fly uppon their shippe, and alight upon the toppe of the mast.”—De Loier, Treatise of Spectres, 67 (1605). Hermês Trismegis´tus (Hermês “thrice-greatest”), the Egyptian Thoth, to whom is ascribed a host of inventions: as the art of writing in hieroglyphics, the first Egyptian code of laws, the art of harmony, the science of astrology, the invention of the late and lyre, magic, etc. (twentieth century B.C.).
  • 70. The school of Hermês Trismegistus, Who uttered his oracles sublime Before the Olympiads. Longfellow, The Golden Legend (1851). Her´mesind (3 syl.), daughter of Pelayo and Gaudio´sê. She was plighted to Alphonso, son of Lord Pedro of Cantabria. Both Alphonso and Hermesind at death were buried in the cave of St. Antony, in Covadonga. Her´mia, daughter of Ege´us (3 syl.) of Athens, and promised by him in marriage to Demētrius. As Hermia loved Lysander, and refused to marry Demetrius, her father summoned her before the duke, and requested that the “law of the land” might be carried out, which was death or perpetual virginity. The duke gave Hermia four days to consider the subject, at the expiration of which time she was either to obey her father or lose her life. She now fled from Athens with Lysander. Demetrius went in pursuit of her, and Helĕna, who doted on Demetrius, followed. All four came to a wood, and falling asleep from weariness, had a dream about the fairies. When Demetrius woke up, he came to his senses, and seeing that Hermia loved another, consented to marry Helena; and Egēus gladly gave the hand of his daughter to Lysander.—Shakespeare, Midsummer Night’s Dream (1592). Herm´ion, the young wife of Damon “the Pythagore´an” and senator of Syracuse.—J. Banium, Damon and Pythias (1825). Hermionê (4 syl.) or Harmo´nia, wife of Cadmus. Leaving Thebes, Cadmus and his wife went to Illyr´ia, and were both changed into serpents for having killed a serpent sacred to Mars.—Ovid, Metamorphoses, iv. 590, etc.
  • 71. Never since of serpent-kind Lovelier, not those that in Illyria changed— Hermionê and Cadmus. Milton, Paradise Lost, ix. 505, etc. (1665). Hermionê, (4 syl.), wife of Leontês, king of Sicily. The king, being jealous, sent her to prison, where she gave birth to a daughter, who, at the king’s command, was to be placed on a desert shore and left to perish. The child was driven by a storm to the “coast” of Bohemia, and brought up by a shepherd who called her Per´dĭta. Florĭzel, the son of Polixenês, king of Bohemia, fell in love with her, and they fled to Sicily to escape the vengeance of the angry king. Being introduced to Leontês, it was soon discovered that Perdita was his lost daughter, and Polixenês gladly consented to the union he had before objected to. Pauli´na (a lady about the court) now asked the royal party to her house to inspect a statue of Hermionê, which turned out to be the living queen herself.—Shakespeare, The Winter’s Tale (1594). Hermionê, (4 syl.), only daughter of Helen and Menelā´os (4 syl.) king of Sparta. She was betrothed to Orestês, but after the fall of Troy was promised by her father in marriage to Pyrrhus, king of Epirus. Orestes madly loved her, but Hermione as madly loved Pyrrhus. When Pyrrhus fixed his affections on Androm´achê (widow of Hector, and his captive), the pride and jealousy of Hermione were roused. At this crisis, an embassy led by Orestês arrived at the court of Pyrrhus, to demand the death of Asty´anax, the son of Andromachê and Hector, lest when he grew to manhood he might seek to avenge his father’s death. Pyrrhus declined to give up the boy, and married Andromachê. The passion of Hermionê was now goaded to madness; and when she heard that the Greek ambassadors had fallen on Pyrrhus and murdered him, she stabbed herself and died.—Ambrose Philips, The Distressed Mother (1712). This was a famous part with Mrs. Porter (*-1762), and with Miss Young, better known as Mrs. Pope (1740-1797).
  • 72. Hermionê (4 syl.), daughter of Dannischemend, the Persian sorcerer, mentioned in Donnerhugel’s narrative.—Sir W. Scott, Anne of Geierstein (time, Edward IV.). Hermionê (The Lady), or Lady Ermin´ia Pauletti, privately married to Lord Dalgarno.—Sir W. Scott, Fortunes of Nigel (time, James I.). Hermit, the pseudonym of the poet Hayley, the friend of Cowper. Hermit (The English), Roger Crab, who subsisted on three farthings a week, his food being bran, herbs, roots, dock leaves, and mallows (*-1680). Hermit (Peter the), the instigator of the first crusade (1050-1115). Hermit and the Youth (The). A hermit, desirous to study the ways of Providence, met with a youth, who became his companion. The first night, they were most hospitably entertained by a nobleman, but at parting the young man stole his entertainer’s golden goblet. Next day, they obtained with difficulty of a miser shelter from a severe storm, and at parting the youth gave him the golden goblet. Next night, they were modestly but freely welcomed by one of the middle class, and at parting the youth “crept to the cradle where an infant slept, and wrung its neck.” It was the only child of their kind host. Leaving the hospitable roof, they lost their way, and were set right by a guide, whom the youth pushed into a river, and he was drowned. The hermit began to curse the youth, when lo! he turned into an angel, who thus explained his acts: “I stole the goblet from the rich lord to teach him not to trust in uncertain riches. I gave the goblet to the miser to teach him that kindness always meets its reward. I strangled the infant because the man loved it better than he loved God. I pushed the guide into the river because he intended at night-fall to commit a robbery.” The hermit bent his head and cried, “The ways of the Lord are past finding out! but He doeth all things well. Teach me to say with faith, ‘Thy will be done?’”—Parnell. (1679-1717).
  • 73. In the Talmud is a similar and better allegory. Rabbi Jachanan accompanied Elijah on a journey, and they came to the house of a poor man, whose only treasure was a cow. The man and his wife ran to meet and welcome the strangers, but next morning the poor man’s cow died. Next night they were coldly received by a proud, rich man, who fed them only with bread and water; and next morning Elijah sent for a mason to repair a wall which was falling down, in return for the hospitality received. Next night they entered a synagogue, and asked, “Who will give a night’s lodging to two travellers!” but none offered to do so. At parting, Elijah said, “I hope you will all be made presidents.” The following night they were lodged by the members of another synagogue in the best hotel of the place, and at parting Elijah said, “May the Lord appoint over you but one president.” The rabbi, unable to keep silence any longer, begged Elijah to explain the meaning of his dealings with men; and Elijah replied: “In regard to the poor man who received us so hospitably, it was decreed that his wife was to die that night, but, in reward of his kindness, God took the cow instead of the wife. I repaired the wall of the rich miser because a chest of gold was concealed near the place, and if the miser had repaired the wall he would have discovered the treasure. I said to the inhospitable synagogue, ‘May each member be president,’ because no one can serve two masters. I said to the hospitable synagogue, ‘May you have but one president,’ because with one head there can be no divisions of counsel. Say not, therefore, to the Lord, ‘What doest Thou?’ but say in thy heart, ‘Must not the Lord of all the earth do right’”—The Talmud (“Trust in God”). Hermite (Tristan l’) or “Tristan of the Hospital,” provost-marshal of France. He was the main instrument in carrying out the nefarious schemes of Louis XI, who used to call him his “gossip.” Tristan was a stout, middle-sized man, with a hang-dog visage and most repulsive smile.—Sir W. Scott, Quentin Durward and Anne of Geierstein (time, Edward IV.). Hero, daughter of Leonāto, governor of Messi´na. She was of a quiet, serious disposition, and formed a good contrast to the gay, witty rattle-pate, called Beatrice, her cousin. Hero was about to be
  • 74. married to Lord Claudio, when Don John played on her a most infamous practical joke, out of malice. He bribed Hero’s waiting- woman to dress in Hero’s clothes, and to talk with him by moonlight from the chamber balcony; he then induced Claudio to hide himself in the garden, to overhear what was said. Claudio, thinking the person to be Hero, was furious, and next day at the altar rejected the bride with scorn. The priest, convinced of Hero’s innocence, gave out that she was dead, the servant confessed the trick, Don John took to flight, and Hero married Claudio, her betrothed.— Shakespeare, Much Ado about Nothing (1600). Hero, [Sutton], niece of Sir William Sutton, and beloved by Sir Valentine de Grey. Hero “was fair as no eye ever fairer saw, of noble stature, head of antique mould, magnificent as far as may consist with softness, features full of thought and moods, wishes and fancies, and limbs the paragon of symmetry.” Having offended her lover by waltzing with Lord Athunree, she assumed the garb of a quakeress, called herself “Ruth,” and got introduced to Sir Valentine, who proposed marriage to her, and then discovered that Hero was Ruth and Ruth was Hero.—S. Knowles, Woman’s Wit, etc. (1838). Hero and Leander (3 syl.). Hero, a priestess of Venus, fell in love with Leander, who swam across the Hellespont every night to visit her. One night he was drowned in so doing, and Hero in grief threw herself into the same sea.—Musæus, Leander and Hero. Hero of Fable (The), the duc de Guise. Called by the French L’Hero de la Fable (1614-1664). Hero of History (The), the duc d’Enghien, Prince of Condé. Called by the French L’Hero de l’Histoire. This was Le grand Condé (1621-1687). Hero of Modern Italy, Garibaldi (1807-1882). Herodias. Divorced wife of Herodius Philippus, afterward married to Herod Antipas, Mother of Salome and murderer of John the
  • 75. Baptist. Her´on (Sir George), of Chip-chace, an officer with Sir John Foster.—Sir W. Scott, The Monastery (time, Elizabeth). Heros´tratos or Erostratos, the Ephesian who set fire to the temple of Ephesus (one of the seven wonders of the world) merely to immortalize his name. The Ephesians made it penal even to mention his name. Herostratus shall prove vice governes fame. Who built that church he burnt hath lost his name. Lord Brooke, Inquisition upon Fame (1554-1628). Herrick. Overseer on a Virginia plantation, whose only daughter is burned to death trying to save a favorite horse of the man she loves hopelessly.—Amelia C. Rives-Chanler, Virginia of Virginia, (1888). Herries (Lord), a friend of Queen Mary of Scotland, and attending on her at Dundrennan.—Sir W. Scott, The Abbott (time, Elizabeth). Herschel (Sir F. Wm.) discovered the eighth planet, at first called the Georgium sidus, in honor of George III., and now called Saturn. In allusion to this, Campbell says he
  • 76. Gave the lyre of heaven another string. Pleasures of Hope, i. (1799.) Hertford (The marquis of), in the court of Charles II.—Sir W. Scott, Woodstock (time, Commonwealth). Her Trippa, meant for Henry Cornelius Agrippa, of Nettesheim, philosopher and physician. “Her” is a contraction of He´ricus, and “Trippa” a play on the words Agrippa and tripe.—Rabelais, Pantag ´ruel, iii. 25 (1545). Herwig, king of Hel´igoland, betrothed to Gudrun, daughter of King Hettel (Attila). She was carried off by Hartmuth, king of Norway, and as she refused to marry him, was put to the most menial work. Herwig conveyed an army into Norway, utterly defeated Hartmuth, liberated Gudrun, and married her.—Gudrun, a German epic of the thirteenth century. Her´zog (Duke), commander-in-chief of the ancient Teutons (Germans). The herzog was elected by the freemen of the tribe, but in times of war and danger, when several tribes united, the princes selected a leader, who was called also “herzog,” similiar to the Gaulish “brennus” or “bren,” and the Celtic “pendragon” or head chief. Heskett (Ralph), landlord of the village ale-house where Robin Oig and Harry Wakefield fought. Dame Heskett, Ralph’s wife.—Sir. W. Scott, The Two Drovers (time, George III.). Hesper´ides (4 syl.) The Hesper´ian Field. The Hesperidês were the women who guarded the golden apples which Earth gave to Herê at her marriage with Zeus (Jove). They were assisted by the dragon Ladon. The Hesperian Fields are the orchards in which the golden apples grew. The Island is one of the Cape Verd Isles, in the Atlantic.
  • 77. Hesperus, the knight called by Tennyson “Evening Star;” but called in the History of Prince Arthur, “the Green Knight” or Sir Pertolope (3 syl.). One of the four brothers who kept the passages of Castle Perilous.—Tennyson, Idylls (“Gareth and Lynette”); Sir T. Malory, History of Prince Arthur, i. 127 (1470). ⁂ It is a manifest blunder to call the Green Knight “Hesperus the Evening Star,” and the Blue Knight the “Morning Star.” The old romance makes the combat with the “Green Knight” at dawn, and with the “Blue Knight” at sunset. The error has arisen from not bearing in mind that our forefathers began the day with the preceding eve, and ended it at sunset. Hetherford (Reuben), stupid suitor of Molly Wilder. He will not relinquish her, although assured that she is to marry another man, and when the news comes that her husband has been drowned, renews his suit, only to be again rejected.—Jane Goodwin Austin, A Nameless Nobleman (1881). Hettly (May), an old servant of Davie Deans.—Sir W. Scott, Heart of Midlothian (time, George II.). Heyward (Duncan). A major in the English army in America, sent to escort the Munro sisters to their father, and sharer in the perils incurred by them in their journey by stream and forest. He is beloved by both sisters and marries Alice.—James Fennimore Cooper, Last of the Mohicans. Heukbane (Mrs.), the butcher’s wife at Fairport, and a friend of Mrs. Mailsetter.—Sir W. Scott, The Antiquary (time, George III.). Hew, son of Lady Helen of “Merryland town” (Milan), enticed by an apple presented to him by a Jewish maiden, who then “stabbed him with a penknife, rolled the body in lead, and cast it into a well.” Lady Helen went in search of her child, and its ghost cried out from the bottom of the well:
  • 78. The lead is wondrous heavy, mither; The well is wondrous deep: A keen penknife sticks in my heart; A word I dounae speik. Percy, Reliques, i. 3. Hewit (Godfrey Bertram), natural son of Mr. Godfrey Betram.—Sir W. Scott, Guy Mannering (time, George II.). Hezekiah Grumbles, intended by nature for a farmer; intended by parents for a clergyman; makes a soldier of himself in the Civil War 1861-65.—William M. Baker, The Making of a Man (1881). Hezekiah Bedott, easy-going, meek and slow-spoken husband of Priscilla Bedott. “Wonderful hand to moralize, specially after he begun to enjoy poor health.”—Frances Miriam Twitcher, The Widow Bedott Papers (1856). Hiawa´tha, the prophet teacher, son of Mudjekee´wis (the west wind) and Weno´nah, daughter of Noko´mis. He represents the progress of civilization among the North American Indians. Hiawatha first wrestled with Monda´min (maize), and, having subdued it, gave it to man for food. He then taught man navigation; then he subdued Mishe Nah´ma (the sturgeon), and taught the Indians how to make oil therefrom for winter. His next exploit was against the magician Megissog´non, the author of disease and death; having slain this monster, he taught man the science of medicine. He then married Minneha´ha (laughing water), and taught man to be the husband of one wife, and the comforts of domestic peace. Lastly, he taught man picture-writing. When the white men came with the gospel, Hiawatha ascended to the kingdom of Pone´mah, the land of the hereafter.—Longfellow, Hiawatha. Hiawatha’s Moc´casins. When Hiawatha put on his moccasins, he could measure a mile at a single stride.
  • 79. He had moccasins enchanted, Magic moccasins of deer-skin; When he bound them round his ankles At each stride a mile he measured. Longfellow, Hiawatha, iv. Hiawatha’s Great Friends, Chibia´bos (the sweetest of all musicians) and Kwa´sind (the strongest of all mortals).—Longfellow, Hiawatha, vi. Hick´athrift (Tom or Jack), a poor laborer in the time of the Conquest, of such enormous strength that he killed, with an axletree and cartwheel, a huge giant, who lived in a marsh at Tylney, in Norfolk. He was knighted, and made governor of Thanet. Hickathrift is sometimes called Hickafric. When a man sits down to write a history, though it be but the history of Jack Hickathrift, ... he knows no more than his heels what lets ... he is to meet with in his way.—Sterne. Hick´ory (Old), General Andrew Jackson. He was first called “Tough,” then “Tough as Hickory,” and, lastly, “Old Hickory.” Another story is that in 1813, when engaged in war with the Creek Indians, he fell short of supplies, and fed his men on hickory nuts (1767- 1845). Hicks, short, slight young man ... with an air at once amiable and baddish, whose father sends him on a sea-voyage to cure him of drunkenness.—William Dean Howells, The Lady of the Aroostook (1879). Hi´erocles (4 syl.), the first person who compiled jokes and bon mots. After a life-long labor, he got together twenty-one, which he left to the world as his legacy. Hence arose the phrase, An Hieroc ´lean legacy, no legacy at all, or a legacy of empty promises, or a legacy of no worth.
  • 80. One of his anecdotes is that of a man who wanted to sell his house, and carried about a brick to show as a specimen of it. Hieron´imo, the chief character of Thomas Kyd’s drama in two parts, pt. i. being called Hieronimo, and pt. ii. The Spanish Tragedy, or Hieronimo is Mad Again. In the latter play, Horatio, only son of Hieronimo, sitting with Belimpe´ria in an alcove, is murdered by his rival, Balthazar, and the lady’s brother, Lorenzo. The murderers hang the dead body on a tree in the garden, and Hieronimo, aroused by the screams of Belimperia, rushing into the garden, sees the dead body of his son, and goes raving mad (1588). Higden (Mrs. Betty), an old woman nearly four score, very poor, but hating the union-house more than she feared death. Betty Higden kept a mangle, and “minded young children” at four-pence a week. A poor workhouse lad named Sloppy helped her to turn the mangle. Mrs. Boffin wished to adopt Johnny, Betty’s infant grandchild, but he died in the Children’s Hospital. She was one of those old women, was Mrs. Betty Higden, who, by dint of an indomitable purpose and a strong constitution, fight out many years; an active old woman, with a bright dark eye and a resolute face, yet quite a tender creature, too.—C. Dickens, Our Mutual Friend, i. 16 (1864). Higg, “the son of Snell,” the lame witness at the trial of Rebecca. —Sir W. Scott, Ivanhoe (time, Richard I.). Higgen, Prigg, Snapp, and Ferret, knavish beggars in The Beggar’s Bush, a drama by Beaumont and Fletcher (1622). High and Low Heels, two factions in Lilliput. So called from the high and low heels of their shoes, badges of the two factions. The high heels (tories and the high-church party) were friendly to the ancient constitution of the empire, but the emperor employed the Low-heels (whigs and low-churchmen) as his ministers of state.— Swift, Gulliver’s Travels (“Lilliput,” 1726).
  • 81. Welcome to our website – the ideal destination for book lovers and knowledge seekers. With a mission to inspire endlessly, we offer a vast collection of books, ranging from classic literary works to specialized publications, self-development books, and children's literature. Each book is a new journey of discovery, expanding knowledge and enriching the soul of the reade Our website is not just a platform for buying books, but a bridge connecting readers to the timeless values of culture and wisdom. With an elegant, user-friendly interface and an intelligent search system, we are committed to providing a quick and convenient shopping experience. Additionally, our special promotions and home delivery services ensure that you save time and fully enjoy the joy of reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookultra.com