PostgreSQL Server Programming 2nd Edition Usama Dar - Download the ebook and start exploring right away
PostgreSQL Server Programming 2nd Edition Usama Dar - Download the ebook and start exploring right away
https://ebookultra.com/download/postgresql-2nd-edition-korry-douglas/
https://ebookultra.com/download/professional-sql-
server-2005-programming-robert-vieira/
https://ebookultra.com/download/beginning-databases-with-postgresql-
from-novice-to-professional-2nd-edition-matthew/
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/
https://ebookultra.com/download/programming-microsoft-sql-
server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick-
dobson/
https://ebookultra.com/download/building-bluetooth-low-energy-
systems-1st-edition-muhammad-usama-bin-aftab/
https://ebookultra.com/download/computer-networks-an-open-source-
approach-1st-edition-ying-dar-lin/
https://ebookultra.com/download/server-study-guide-2nd-ed-edition-
brad-hryhoruk/
PostgreSQL Server Programming 2nd Edition Usama
Dar Digital Instant Download
Author(s): Usama Dar, Hannu Krosing, Jim Mlodgenski, Kirk Roybal
ISBN(s): 9781783980581, 1783980583
Edition: 2
File Details: PDF, 2.28 MB
Year: 2015
Language: english
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 Second
Edition
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
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
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.
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.
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 <[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.
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.
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.
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
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.
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;
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.
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.
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.
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.
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).
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).
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).
with
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).
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 (The Cretan). All the three Idæan Dactyls were so called:
viz., Kelmis (“the smelter”), Damnamĕneus (“the hammer”), and
Acmon (“the anvil”).
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).
(The Bætis is the Guadalquiver, and the Bætic vale Granāda and
Andalucia).
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).
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.
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.).
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.
ebookultra.com