Skip to content

Commit 4f9976a

Browse files
author
James William Pye
committed
Split the administration sections into two sections.
One for quick & simple installs and the other for "advanced" installation. Relocate the Readme as the mechanics chapter.
1 parent 9b496b6 commit 4f9976a

File tree

4 files changed

+279
-280
lines changed

4 files changed

+279
-280
lines changed

src/README renamed to src/documentation/mechanics.txt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
pg-python architecture
2-
======================
1+
=========
2+
Mechanics
3+
=========
34

4-
This README provides a high-level overview of the implementation.
5+
This chapter discusses some of the internal mechanics and design decisions
6+
of pg-python.
57

68
Native Type Interfaces
7-
----------------------
9+
======================
810

911
pg-python was designed with the goal of providing Python interfaces to
1012
PostgreSQL objects--often conceptual rather than literal. This marks a sharp
@@ -33,14 +35,14 @@ Postgres object is present, the other operand will be converted to that type.
3335

3436

3537
Error Management
36-
----------------
38+
================
3739

3840
pg-python handles database errors by raising a Python exception representing
3941
the error. By doing this, pg-python must record when this has been done so that
4042
future database actions can be prohibited. The `ext_state` global is used to
4143
track the error state of the PL.
4244

43-
When a database error(ereport, elog) occurs, pl_state is altered to indicate
45+
When a database error(ereport, elog) occurs, ext_state is altered to indicate
4446
that subsequent use of database functionality should be restricted by an
4547
exception being raised. The "DB_IS_NOT_READY()" macro should be used at the
4648
beginning of every Python interface that requires that the database is in a
@@ -71,15 +73,15 @@ The following error codes have been added:
7173
and it should be raised (Python) or thrown (Postgres) accordingly.
7274

7375
Transaction Management (Internal Subtransactions)
74-
-------------------------------------------------
76+
=================================================
7577

7678
Subtransactions are managed using a simple counter. Each Postgres.Transaction
7779
instance will get a local transaction identifier that is used to validate that
7880
transactions are exited in the appropriate order.
7981

8082

8183
Prepared Statements and Cursors (SPI)
82-
-------------------------------------
84+
=====================================
8385

8486
Database access is implemented using two types: the Postgres.Statement and the
8587
Postgres.Cursor.
@@ -93,7 +95,7 @@ scrollable cursor is created, the seek and read methods are available for use.
9395

9496

9597
Postgres Interface Module
96-
-------------------------
98+
=========================
9799

98100
All Postgres interfaces are provided using the "Postgres" module. This is a
99101
built-in module that is extended with the contents of the "module.py" file.
@@ -103,7 +105,7 @@ high-level initialization(@pytypes is implemented in pure-Python).
103105

104106

105107
First Call Initialization
106-
-------------------------
108+
=========================
107109

108110
Much of the PL is initialized in _PG_init. However, it is possible for _PG_init
109111
to be executed outside of a transaction(preloading), which means that we cannot
@@ -114,7 +116,7 @@ pseudo-module.
114116

115117

116118
Inline Execution
117-
----------------
119+
================
118120

119121
DO statements are handled using a fake PyPgFunction object--that is, there is no
120122
corresponding pg_proc entry. The function's module is set to the InlineExecutor
@@ -124,7 +126,7 @@ takes a single argument, the source to execute.
124126

125127

126128
Interrupt Support
127-
-----------------
129+
=================
128130

129131
Interrupts are supported by overriding the default signal handlers for SIGTERM
130132
and SIGINT. While scary at first, these overrides are *not* installed unless the

src/documentation/project.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ It's not supported. So in such cases::
2828

2929
Will be necessary.
3030

31-
Changes v1.1
32-
============
31+
Changes
32+
=======
33+
34+
Version 1.1 introduced the following changes:
3335

3436
Deprecations
3537
Removed Support for PostgreSQL 8.3

src/documentation/sphinx/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Contents
1414
project
1515
usage
1616
reference
17+
mechanics

0 commit comments

Comments
 (0)