-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/announce.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/announce.txt
deleted file mode 100644
index fa0845855aa..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/announce.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-======================
-PyGreSQL Announcements
-======================
-
--------------------------------
-Release of PyGreSQL version 4.0
--------------------------------
-
-PyGreSQL v4.0 has been released.
-
-It is available at: ftp://ftp.PyGreSQL.org/pub/distrib/PyGreSQL-4.0.tgz.
-
-If you are running NetBSD, look in the packages directory under databases.
-There is also a package in the FreeBSD ports collection.
-
-Please refer to `changelog.txt `_
-for things that have changed in this version.
-
-Please refer to `readme.txt `_
-for general information.
-
-| D'Arcy J.M. Cain
-| darcy@PyGreSQL.org
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.html
deleted file mode 100644
index 24c38e9fde9..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.html
+++ /dev/null
@@ -1,333 +0,0 @@
-
-
-
-
-
-
-PyGreSQL ChangeLog
-
-
-
-
Dropped support for Python below 2.3 and PostgreSQL below 7.4.
-
Improved performance of fetchall() for large result sets
-by speeding up the type casts (as suggested by Peter Schuller).
-
Exposed exceptions as attributes of the connection object.
-
Exposed connection as attribute of the cursor object.
-
Cursors now support the iteration protocol.
-
Added new method to get parameter settings.
-
Added customizable row_factory as suggested by Simon Pamies.
-
Separated between mandatory and additional type objects.
-
Added keyword args to insert, update and delete methods.
-
Added exception handling for direct copy.
-
Release the GIL while making a connection
-(as suggested by Peter Schuller).
-
If available, use decimal.Decimal for numeric types.
-
Allow DB wrapper to be used with DB-API 2 connections
-(as suggested by Chris Hilton).
-
Made private attributes of DB wrapper accessible.
-
Dropped dependence on mx.DateTime module.
-
Support for PQescapeStringConn() and PQescapeByteaConn();
-these are now also used by the internal _quote() functions.
-
Added 'int8' to INTEGER types. New SMALLINT type.
-
Added a way to find the number of rows affected by a query()
-with the classic pg module by returning it as a string.
-For single inserts, query() still returns the oid as an integer.
-The pgdb module already provides the "rowcount" cursor attribute
-for the same purpose.
-
Improved getnotify() by calling PQconsumeInput() instead of
-submitting an empty command.
-
Removed compatibility code for old OID munging style.
-
The insert() and update() methods now use the "returning" clause
-if possible to get all changed values, and they also check in advance
-whether a subsequent select is possible, so that ongoing transactions
-won't break if there is no select privilege.
-
Added "protocol_version" and "server_version" attributes.
-
Revived the "user" attribute.
-
The pg module now works correctly with composite primary keys;
-these are represented as frozensets.
-
Removed the undocumented and actually unnecessary "view" parameter
-from the get() method.
-
get() raises a nicer ProgrammingError instead of a KeyError
-if no primary key was found.
-
delete() now also works based on the primary key if no oid available
-and returns whether the row existed or not.
Some cleanups and fixes.
-This is the first version where PyGreSQL is moved back out of the
-PostgreSQL tree. A lot of the changes mentioned below were actually
-made while in the PostgreSQL tree since their last release.
-
-
Allow for larger integer returns
-
Return proper strings for true and false
-
Cleanup convenience method creation
-
Enhance debugging method
-
Add reopen method
-
Allow programs to preload field names for speedup
-
Move OID handling so that it returns long instead of int
Note that there are very few changes to PyGreSQL between 3.1 and 3.2.
-The main reason for the release is the move into the PostgreSQL
-development tree. Even the WIN32 changes are pretty minor.
Insert returns None if the user doesn't have select permissions
-on the table. It can (and does) happen that one has insert but
-not select permissions on a table.
-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.txt
deleted file mode 100644
index ea0d71d1ff5..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/changelog.txt
+++ /dev/null
@@ -1,285 +0,0 @@
-==================
-PyGreSQL ChangeLog
-==================
-
-Version 4.0 (2009-01-01)
-------------------------
-- Dropped support for Python below 2.3 and PostgreSQL below 7.4.
-- Improved performance of fetchall() for large result sets
- by speeding up the type casts (as suggested by Peter Schuller).
-- Exposed exceptions as attributes of the connection object.
-- Exposed connection as attribute of the cursor object.
-- Cursors now support the iteration protocol.
-- Added new method to get parameter settings.
-- Added customizable row_factory as suggested by Simon Pamies.
-- Separated between mandatory and additional type objects.
-- Added keyword args to insert, update and delete methods.
-- Added exception handling for direct copy.
-- Release the GIL while making a connection
- (as suggested by Peter Schuller).
-- If available, use decimal.Decimal for numeric types.
-- Allow DB wrapper to be used with DB-API 2 connections
- (as suggested by Chris Hilton).
-- Made private attributes of DB wrapper accessible.
-- Dropped dependence on mx.DateTime module.
-- Support for PQescapeStringConn() and PQescapeByteaConn();
- these are now also used by the internal _quote() functions.
-- Added 'int8' to INTEGER types. New SMALLINT type.
-- Added a way to find the number of rows affected by a query()
- with the classic pg module by returning it as a string.
- For single inserts, query() still returns the oid as an integer.
- The pgdb module already provides the "rowcount" cursor attribute
- for the same purpose.
-- Improved getnotify() by calling PQconsumeInput() instead of
- submitting an empty command.
-- Removed compatibility code for old OID munging style.
-- The insert() and update() methods now use the "returning" clause
- if possible to get all changed values, and they also check in advance
- whether a subsequent select is possible, so that ongoing transactions
- won't break if there is no select privilege.
-- Added "protocol_version" and "server_version" attributes.
-- Revived the "user" attribute.
-- The pg module now works correctly with composite primary keys;
- these are represented as frozensets.
-- Removed the undocumented and actually unnecessary "view" parameter
- from the get() method.
-- get() raises a nicer ProgrammingError instead of a KeyError
- if no primary key was found.
-- delete() now also works based on the primary key if no oid available
- and returns whether the row existed or not.
-
-
-Version 3.8.1 (2006-06-05)
---------------------------
-- Use string methods instead of deprecated string functions.
-- Only use SQL-standard way of escaping quotes.
-- Added the functions escape_string() and escape/unescape_bytea()
- (as suggested by Charlie Dyson and Kavous Bojnourdi a long time ago).
-- Reverted code in clear() method that set date to current.
-- Added code for backwards compatibility in OID munging code.
-- Reorder attnames tests so that "interval" is checked for before "int."
-- If caller supplies key dictionary, make sure that all has a namespace.
-
-Version 3.8 (2006-02-17)
-------------------------
-- Installed new favicon.ico from Matthew Sporleder
-- Replaced snprintf by PyOS_snprintf.
-- Removed NO_SNPRINTF switch which is not needed any longer
-- Clean up some variable names and namespace
-- Add get_relations() method to get any type of relation
-- Rewrite get_tables() to use get_relations()
-- Use new method in get_attnames method to get attributes of views as well
-- Add Binary type
-- Number of rows is now -1 after executing no-result statements
-- Fix some number handling
-- Non-simple types do not raise an error any more
-- Improvements to documentation framework
-- Take into account that nowadays not every table must have an oid column
-- Simplification and improvement of the inserttable() function
-- Fix up unit tests
-- The usual assortment of minor fixes and enhancements
-
-Version 3.7 (2005-09-07)
-------------------------
-Improvement of pgdb module:
-
-- Use Python standard `datetime` if `mxDateTime` is not available
-
-Major improvements and clean-up in classic pg module:
-
-- All members of the underlying connection directly available in `DB`
-- Fixes to quoting function
-- Add checks for valid database connection to methods
-- Improved namespace support, handle `search_path` correctly
-- Removed old dust and unnessesary imports, added docstrings
-- Internal sql statements as one-liners, smoothed out ugly code
-
-Version 3.6.2 (2005-02-23)
---------------------------
-- Further fixes to namespace handling
-
-Version 3.6.1 (2005-01-11)
---------------------------
-- Fixes to namespace handling
-
-Version 3.6 (2004-12-17)
-------------------------
-- Better DB-API 2.0 compliance
-- Exception hierarchy moved into C module and made available to both APIs
-- Fix error in update method that caused false exceptions
-- Moved to standard exception hierarchy in classic API
-- Added new method to get transaction state
-- Use proper Python constants where appropriate
-- Use Python versions of strtol, etc. Allows Win32 build.
-- Bug fixes and cleanups
-
-Version 3.5 (2004-08-29)
-------------------------
-Fixes and enhancements:
-
-- Add interval to list of data types
-- fix up method wrapping especially close()
-- retry pkeys once if table missing in case it was just added
-- wrap query method separately to handle debug better
-- use isinstance instead of type
-- fix free/PQfreemem issue - finally
-- miscellaneous cleanups and formatting
-
-Version 3.4 (2004-06-02)
-------------------------
-Some cleanups and fixes.
-This is the first version where PyGreSQL is moved back out of the
-PostgreSQL tree. A lot of the changes mentioned below were actually
-made while in the PostgreSQL tree since their last release.
-
-- Allow for larger integer returns
-- Return proper strings for true and false
-- Cleanup convenience method creation
-- Enhance debugging method
-- Add reopen method
-- Allow programs to preload field names for speedup
-- Move OID handling so that it returns long instead of int
-- Miscellaneous cleanups and formatting
-
-Version 3.3 (2001-12-03)
-------------------------
-A few cleanups. Mostly there was some confusion about the latest version
-and so I am bumping the number to keep it straight.
-
-- Added NUMERICOID to list of returned types. This fixes a bug when
- returning aggregates in the latest version of PostgreSQL.
-
-Version 3.2 (2001-06-20)
-------------------------
-Note that there are very few changes to PyGreSQL between 3.1 and 3.2.
-The main reason for the release is the move into the PostgreSQL
-development tree. Even the WIN32 changes are pretty minor.
-
-- Add Win32 support (gerhard@bigfoot.de)
-- Fix some DB-API quoting problems (niall.smart@ebeon.com)
-- Moved development into PostgreSQL development tree.
-
-Version 3.1 (2000-11-06)
-------------------------
-- Fix some quoting functions. In particular handle NULLs better.
-- Use a method to add primary key information rather than direct
- manipulation of the class structures
-- Break decimal out in `_quote` (in pg.py) and treat it as float
-- Treat timestamp like date for quoting purposes
-- Remove a redundant SELECT from the `get` method speeding it,
- and `insert` (since it calls `get`) up a little.
-- Add test for BOOL type in typecast method to `pgdbTypeCache` class
- (tv@beamnet.de)
-- Fix pgdb.py to send port as integer to lower level function
- (dildog@l0pht.com)
-- Change pg.py to speed up some operations
-- Allow updates on tables with no primary keys
-
-Version 3.0 (2000-05-30)
-------------------------
-- Remove strlen() call from pglarge_write() and get size from object
- (Richard@Bouska.cz)
-- Add a little more error checking to the quote function in the wrapper
-- Add extra checking in `_quote` function
-- Wrap query in pg.py for debugging
-- Add DB-API 2.0 support to pgmodule.c (andre@via.ecp.fr)
-- Add DB-API 2.0 wrapper pgdb.py (andre@via.ecp.fr)
-- Correct keyword clash (temp) in tutorial
-- Clean up layout of tutorial
-- Return NULL values as None (rlawrence@lastfoot.com)
- (WARNING: This will cause backwards compatibility issues)
-- Change None to NULL in insert and update
-- Change hash-bang lines to use /usr/bin/env
-- Clearing date should be blank (NULL) not TODAY
-- Quote backslashes in strings in `_quote` (brian@CSUA.Berkeley.EDU)
-- Expanded and clarified build instructions (tbryan@starship.python.net)
-- Make code thread safe (Jerome.Alet@unice.fr)
-- Add README.distutils (mwa@gate.net & jeremy@cnri.reston.va.us)
-- Many fixes and increased DB-API compliance by chifungfan@yahoo.com,
- tony@printra.net, jeremy@alum.mit.edu and others to get the final
- version ready to release.
-
-Version 2.4 (1999-06-15)
-------------------------
-- Insert returns None if the user doesn't have select permissions
- on the table. It can (and does) happen that one has insert but
- not select permissions on a table.
-- Added ntuples() method to query object (brit@druid.net)
-- Corrected a bug related to getresult() and the money type
-- Corrected a bug related to negative money amounts
-- Allow update based on primary key if munged oid not available and
- table has a primary key
-- Add many __doc__ strings (andre@via.ecp.fr)
-- Get method works with views if key specified
-
-Version 2.3 (1999-04-17)
-------------------------
-- connect.host returns "localhost" when connected to Unix socket
- (torppa@tuhnu.cutery.fi)
-- Use `PyArg_ParseTupleAndKeywords` in connect() (torppa@tuhnu.cutery.fi)
-- fixes and cleanups (torppa@tuhnu.cutery.fi)
-- Fixed memory leak in dictresult() (terekhov@emc.com)
-- Deprecated pgext.py - functionality now in pg.py
-- More cleanups to the tutorial
-- Added fileno() method - terekhov@emc.com (Mikhail Terekhov)
-- added money type to quoting function
-- Compiles cleanly with more warnings turned on
-- Returns PostgreSQL error message on error
-- Init accepts keywords (Jarkko Torppa)
-- Convenience functions can be overridden (Jarkko Torppa)
-- added close() method
-
-Version 2.2 (1998-12-21)
-------------------------
-- Added user and password support thanks to Ng Pheng Siong (ngps@post1.com)
-- Insert queries return the inserted oid
-- Add new `pg` wrapper (C module renamed to _pg)
-- Wrapped database connection in a class
-- Cleaned up some of the tutorial. (More work needed.)
-- Added `version` and `__version__`.
- Thanks to thilo@eevolute.com for the suggestion.
-
-Version 2.1 (1998-03-07)
-------------------------
-- return fields as proper Python objects for field type
-- Cleaned up pgext.py
-- Added dictresult method
-
-Version 2.0 (1997-12-23)
--------------------------
-- Updated code for PostgreSQL 6.2.1 and Python 1.5
-- Reformatted code and converted to use full ANSI style prototypes
-- Changed name to PyGreSQL (from PyGres95)
-- Changed order of arguments to connect function
-- Created new type `pgqueryobject` and moved certain methods to it
-- Added a print function for pgqueryobject
-- Various code changes - mostly stylistic
-
-Version 1.0b (1995-11-04)
--------------------------
-- Keyword support for connect function moved from library file to C code
- and taken away from library
-- Rewrote documentation
-- Bug fix in connect function
-- Enhancements in large objects interface methods
-
-Version 1.0a (1995-10-30)
--------------------------
-A limited release.
-
-- Module adapted to standard Python syntax
-- Keyword support for connect function in library file
-- Rewrote default parameters interface (internal use of strings)
-- Fixed minor bugs in module interface
-- Redefinition of error messages
-
-Version 0.9b (1995-10-10)
--------------------------
-The first public release.
-
-- Large objects implementation
-- Many bug fixes, enhancements, ...
-
-Version 0.1a (1995-10-07)
--------------------------
-- Basic libpq functions (SQL access)
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/default.css b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/default.css
deleted file mode 100644
index 15d0778af1b..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/default.css
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
-:Author: David Goodger
-:Contact: goodger@users.sourceforge.net
-:Date: $Date: 2006/01/22 16:15:33 $
-:Revision: $Revision: 1.2 $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0 }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
-
-.last, .with-subtitle {
- margin-bottom: 0 ! important }
-
-.hidden {
- display: none }
-
-a.toc-backref {
- text-decoration: none ;
- color: black }
-
-blockquote.epigraph {
- margin: 2em 5em ; }
-
-dl.docutils dd {
- margin-bottom: 0.5em }
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
- font-weight: bold }
-*/
-
-div.abstract {
- margin: 2em 5em }
-
-div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
-*/
-
-div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
-
-div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
-
-div.figure {
- margin-left: 2em ;
- margin-right: 2em }
-
-div.footer, div.header {
- clear: both;
- font-size: smaller }
-
-div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
-
-div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
-
-div.sidebar {
- margin-left: 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
-
-div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
-
-div.system-messages {
- margin: 5em }
-
-div.system-messages h1 {
- color: red }
-
-div.system-message {
- border: medium outset ;
- padding: 1em }
-
-div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
-
-div.topic {
- margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
-
-h1.title {
- text-align: center }
-
-h2.subtitle {
- text-align: center }
-
-hr.docutils {
- width: 75% }
-
-img.align-left {
- clear: left }
-
-img.align-right {
- clear: right }
-
-ol.simple, ul.simple {
- margin-bottom: 1em }
-
-ol.arabic {
- list-style: decimal }
-
-ol.loweralpha {
- list-style: lower-alpha }
-
-ol.upperalpha {
- list-style: upper-alpha }
-
-ol.lowerroman {
- list-style: lower-roman }
-
-ol.upperroman {
- list-style: upper-roman }
-
-p.attribution {
- text-align: right ;
- margin-left: 50% }
-
-p.caption {
- font-style: italic }
-
-p.credits {
- font-style: italic ;
- font-size: smaller }
-
-p.label {
- white-space: nowrap }
-
-p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
-
-p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
-
-p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
-
-p.topic-title {
- font-weight: bold }
-
-pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font-family: serif ;
- font-size: 100% }
-
-pre.literal-block, pre.doctest-block {
- margin-left: 2em ;
- margin-right: 2em ;
- background-color: #eeeeee }
-
-span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
-
-span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
-
-span.interpreted {
- font-family: sans-serif }
-
-span.option {
- white-space: nowrap }
-
-span.pre {
- white-space: pre }
-
-span.problematic {
- color: red }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
-
-table.docinfo {
- margin: 2em 4em }
-
-table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
-
-table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
-
-tt.docutils {
- background-color: #eeeeee }
-
-ul.auto-toc {
- list-style-type: none }
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/docs.css b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/docs.css
deleted file mode 100644
index 3d99c950368..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/docs.css
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-Stylesheet for use with Docutils.
-
-Customized for PyGreSQL docs.
-*/
-
-@import url(default.css);
-
-body {
- margin: 8pt;
- padding: 8pt;
- background-color: #f8f8ff;
- color: #000008;
- text-align: justify;
- font-family: Arial, Verdana, Helvetica, sans-serif;
- font-size: 11pt; }
-
-a {
- text-decoration: none; }
-
-a:hover {
- text-decoration: underline; }
-
-.title, .subtitle {
- color: #003; }
-
-.topic-title {
- color: #006;
- font-size: 14pt; }
-
-h1, h2, h3, h4 {
- color: #006; }
-
-h1 {
- padding-top: 20pt;
- font-size: 17pt; }
-
-div#pygresql-changelog div.section h1 {
- font-size: 12pt;
-}
-
-h1.title {
- font-size: 20pt;
-}
-
-h2 {
- font-size: 14pt; }
-
-h2.subtitle {
- font-size: 16pt;
-}
-
-h3 {
- font-size: 13pt; }
-
-h4 {
- font-size: 12pt; }
-
-a.toc-backref {
- color: #006; }
-
-ul.simple li {
- margin-top: 4pt; }
-
-ul.simple ul li {
- margin-top: 2pt; }
-
-div.contents ul {
- list-style-type: none; }
-
-div.contents ul li {
- margin-top: 4pt;
- font-size: 12pt; }
-
-div.contents ul ul li {
- margin-top: 2pt;
- font-size: 11pt; }
-
-cite {
- font-style: normal;
- font-family: monospace;
- font-weight: bold; }
-
-table.field-list th.field-name {
- font-style: normal;
- font-family: monospace;
- font-weight: bold; }
-
-tt.literal, pre.literal-block {
- font-style: normal;
- font-family: monospace;
- font-weight: bold;
- background-color: #fff; }
-
-tt.literal {
- padding-left: 2pt;
- padding-right: 2pt; }
-
-pre.literal-block {
- padding: 4pt;
- border: 1px dotted #ccc; }
-
-table.docutils {
- border-spacing: 0px;
- border-collapse: collapse; }
-
-table.docutils td {
- margin: 0px;
- padding: 2pt; }
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.html
deleted file mode 100644
index 358de81ea4c..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-PyGreSQL future directions
-
-
-
-
Documentation for the pgdb module (everything specific to PyGreSQL).
-
The large object and direct access functions need much more attention.
-
The C module needs to be cleaned up and redundant code merged,
-and should get its own unit test module.
-
The fetch method should use real cursors.
-
What shall we do with the "tutorial" directory
-(it's rather a tutorial for Postgres/SQL than for PyGreSQL,
-it's using only the query method from the classic pg module and
-no other PyGreSQL functionality, it's rather a demo than a tutorial)?
Notice handling with PQsetNoticeReceiver and PQsetNoticeProcessor
-(one possible implementation was already suggested by Dmitry Dvoinikov
-http://mailman.vex.net/pipermail/pygresql/2005-November/001530.html).
-Maybe also make notifications accessible via the optional cursor and
-connection attribute "messages" proposed in the DB-API specs.
Make use of PQexecParams() and PQprepare(). This could speed up
-executemany() and allow retrieving binary data directly by setting
-the resultFormat parameter to one.
-
Support optional "errorhandler" extension.
-
Support optional cursor and connection attribute "messages".
Users should be able to register their own types with _pg.
-
Let pg and pgdb support namedtuples (as available in Py 2.6).
-pg could get a new method namedresult(), and pgdb could provide
-a row factory for namedtuples (similar to sqlite3).
-
New methods in the classic module, similar to getresult() and
-dictresult(), but returning dictionaries of rows instead of lists
-of rows (with primary key or oids as keys).
-
Make PyGreSQL thread-safe on the connection level.
-
The API documentation could be created with Epydoc.
-
Write a tutorial for beginners and advanced use.
-
More and better documented examples.
-
-
-
-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.txt
deleted file mode 100644
index 8dec0fb8d4c..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/future.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-==========================
-PyGreSQL future directions
-==========================
-
-
-To Do
------
-
-- Documentation for the pgdb module (everything specific to PyGreSQL).
-- The large object and direct access functions need much more attention.
-- The C module needs to be cleaned up and redundant code merged,
- and should get its own unit test module.
-- The fetch method should use real cursors.
-- What shall we do with the "tutorial" directory
- (it's rather a tutorial for Postgres/SQL than for PyGreSQL,
- it's using only the query method from the classic pg module and
- no other PyGreSQL functionality, it's rather a demo than a tutorial)?
-
-Proposed Patches
-----------------
-
-- Notice handling with PQsetNoticeReceiver and PQsetNoticeProcessor
- (one possible implementation was already suggested by Dmitry Dvoinikov
- http://mailman.vex.net/pipermail/pygresql/2005-November/001530.html).
- Maybe also make notifications accessible via the optional cursor and
- connection attribute "messages" proposed in the DB-API specs.
-
-Wish List
----------
-
-- Make SQLSTATE error codes available.
-- Make use of PQexecParams() and PQprepare(). This could speed up
- executemany() and allow retrieving binary data directly by setting
- the resultFormat parameter to one.
-- Support optional "errorhandler" extension.
-- Support optional cursor and connection attribute "messages".
-- Connection as context manager (see http://tinyurl.com/6j9cef).
-- Users should be able to register their own types with _pg.
-- Let pg and pgdb support namedtuples (as available in Py 2.6).
- pg could get a new method namedresult(), and pgdb could provide
- a row factory for namedtuples (similar to sqlite3).
-- New methods in the classic module, similar to getresult() and
- dictresult(), but returning dictionaries of rows instead of lists
- of rows (with primary key or oids as keys).
-- Make PyGreSQL thread-safe on the connection level.
-- The API documentation could be created with Epydoc.
-- Write a tutorial for beginners and advanced use.
-- More and better documented examples.
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/index.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/index.html
deleted file mode 100644
index be2b37cd3e6..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/index.html
+++ /dev/null
@@ -1,182 +0,0 @@
-
-
-
-
- PyGreSQL - PostgreSQL module for Python
-
-
-
-
-
-
-
-
-
PyGreSQL
-
Version 4.0
-
-
:: PostgreSQL module for Python ::
-
-
-
-
PyGreSQL – PostgreSQL module for Python
-
-
PyGreSQL is an open-source
- Python module
- that interfaces to a PostgreSQL database.
- It embeds the PostgreSQL query library to allow easy use of the powerful PostgreSQL
- features from a Python script.
You can join
- the mailing
- list to discuss future development of the PyGreSQL interface.
- This is usually a low volume list except when there are new features
- being added.
-
-
-
Examples
-
-
I am starting to collect examples of applications that use PyGreSQL.
- So far I only have a few but if you have an example for me, you can
- either send me the files or the URL for me to point to.
-
-
Here is a List of motorcycle
- rides in Ontario that uses a PostgreSQL database to store the
- rides. There is a link at the bottom of the page to view the source code.
You must first have installed Python and PostgreSQL on your system.
-If you want to access remote database only, you don't need to install
-the full PostgreSQL server, but only the C interface (libpq). If you
-are on Windows, make sure that the directory with libpq.dll is in your
-PATH environment variable.
-
The current version of PyGreSQL has been tested with Python 2.5 and
-PostGreSQL 8.3. Older version should work as well, but you will need
-at least Python 2.3 and PostgreSQL 7.4.
-
PyGreSQL will be installed as three modules, a dynamic module called
-_pg.pyd, and two pure Python wrapper modules called pg.py and pgdb.py.
-All three files will be installed directly into the Python site-packages
-directory. To uninstall PyGreSQL, simply remove these three files again.
You can currently download PyGreSQL as Linux RPM, NetBSD package and Windows
-installer. Make sure the required Python version of the binary package matches
-the Python version you have installed.
-
Install the package as usual on your system.
-
Note that the documentation is currently only included in the source package.
If you want to install PyGreSQL from Source, or there is no binary
-package available for your platform, follow these instructions.
-
Make sure the Python header files and PostgreSQL client and server header
-files are installed. These come usually with the "devel" packages on Unix
-systems and the installer executables on Windows systems.
-
If you are using a precompiled PostgreSQL, you will also need the pg_config
-tool. This is usually also part of the "devel" package on Unix, and will be
-installed as part of the database server feature on Windows systems.
You can build and install PyGreSQL using
-Distutils.
-
Download and unpack the PyGreSQL source tarball if you haven't already done so.
-
Type the following commands to build and install PyGreSQL:
-
-python setup.py build
-python setup.py install
-
-
If you are using MinGW to build PyGreSQL under
-Microsoft Windows, please note that Python newer version 2.3 is using msvcr71
-instead of msvcrt as its common runtime library. You can allow for that by
-editing the file %MinGWpath%/lib/gcc/%MinGWversion%/specs and changing
-the entry that reads -lmsvcrt to -lmsvcr71. You may also need to copy
-libpq.lib to libpq.a in the PostgreSQL lib directory. Then use
-the following command to build and install PyGreSQL:
The source file for compiling the dynamic module is called pgmodule.c.
-You have two options. You can compile PyGreSQL as a stand-alone module
-or you can build it into the Python interpreter.
-PYINC = path to the Python include files
- (usually something like /usr/include/python)
-PGINC = path to the PostgreSQL client include files
- (something like /usr/include/pgsql or /usr/include/postgresql)
-PSINC = path to the PostgreSQL server include files
- (like /usr/include/pgsql/server or /usr/include/postgresql/server)
-PGLIB = path to the PostgreSQL object code libraries (usually /usr/lib)
-
-
If you are not sure about the above paths, try something like:
--DNO_DEF_VAR no default variables support
--DNO_DIRECT no direct access methods
--DNO_LARGE no large object support
--DNO_PQSOCKET if running an older PostgreSQL
-
-
Define NO_PQSOCKET if you are using a version of PostgreSQL before 6.4
-that does not have the PQsocket function. The other options will be
-described in the next sections.
-
On some systems you may need to include -lcrypt in the list of libraries
-to make it compile.
-
-
Test the new module. Something like the following should work:
-
-$ python
-
->>> import _pg
->>> db = _pg.connect('thilo','localhost')
->>> db.query("INSERT INTO test VALUES ('ping','pong')")
-18304
->>> db.query("SELECT * FROM test")
-eins|zwei
-----+----
-ping|pong
-(1 row)
-
-
-
Finally, move the _pg.so, pg.py, and pgdb.py to a directory in
-your PYTHONPATH. A good place would be /usr/lib/python/site-packages
-if your Python modules are in /usr/lib/python.
Find the directory where your Setup file lives (usually in the Modules
-subdirectory) in the Python source hierarchy and copy or symlink the
-pgmodule.c file there.
-
-
Add the following line to your 'Setup' file:
-
-_pg pgmodule.c -I$PGINC -I$PSINC -L$PGLIB -lpq
-
-
where:
-
-PGINC = path to the PostgreSQL client include files (see above)
-PSINC = path to the PostgreSQL server include files (see above)
-PGLIB = path to the PostgreSQL object code libraries (see above)
-
-
Some options may be added to this line:
-
--DNO_DEF_VAR no default variables support
--DNO_DIRECT no direct access methods
--DNO_LARGE no large object support
--DNO_PQSOCKET if running an older PostgreSQL (see above)
-
-
On some systems you may need to include -lcrypt in the list of libraries
-to make it compile.
-
-
If you want a shared module, make sure that the shared keyword is
-uncommented and add the above line below it. You used to need to install
-your shared modules with makesharedinstall but this no longer seems
-to be true.
-
-
Copy pg.py to the lib directory where the rest of your modules are.
-For example, that's /usr/local/lib/Python on my system.
-
-
Rebuild Python from the root directory of the Python source hierarchy by
-running make-fMakefile.pre.inboot and make&&makeinstall.
-
-
For more details read the documentation at the top of Makefile.pre.in.
-
-
-
-
-
-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/install.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/install.txt
deleted file mode 100644
index 3f19a2c5a29..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/install.txt
+++ /dev/null
@@ -1,188 +0,0 @@
-=====================
-PyGreSQL Installation
-=====================
-
-.. sectnum::
-.. contents:: Contents
-
-
-General
-=======
-
-You must first have installed Python and PostgreSQL on your system.
-If you want to access remote database only, you don't need to install
-the full PostgreSQL server, but only the C interface (libpq). If you
-are on Windows, make sure that the directory with libpq.dll is in your
-``PATH`` environment variable.
-
-The current version of PyGreSQL has been tested with Python 2.5 and
-PostGreSQL 8.3. Older version should work as well, but you will need
-at least Python 2.3 and PostgreSQL 7.4.
-
-PyGreSQL will be installed as three modules, a dynamic module called
-_pg.pyd, and two pure Python wrapper modules called pg.py and pgdb.py.
-All three files will be installed directly into the Python site-packages
-directory. To uninstall PyGreSQL, simply remove these three files again.
-
-
-Installing from a Binary Distribution
-=====================================
-
-This is the easiest way to install PyGreSQL.
-
-You can currently download PyGreSQL as Linux RPM, NetBSD package and Windows
-installer. Make sure the required Python version of the binary package matches
-the Python version you have installed.
-
-Install the package as usual on your system.
-
-Note that the documentation is currently only included in the source package.
-
-
-Installing from Source
-======================
-
-If you want to install PyGreSQL from Source, or there is no binary
-package available for your platform, follow these instructions.
-
-Make sure the Python header files and PostgreSQL client and server header
-files are installed. These come usually with the "devel" packages on Unix
-systems and the installer executables on Windows systems.
-
-If you are using a precompiled PostgreSQL, you will also need the pg_config
-tool. This is usually also part of the "devel" package on Unix, and will be
-installed as part of the database server feature on Windows systems.
-
-Building and installing with Distutils
---------------------------------------
-
-You can build and install PyGreSQL using
-`Distutils `_.
-
-Download and unpack the PyGreSQL source tarball if you haven't already done so.
-
-Type the following commands to build and install PyGreSQL::
-
- python setup.py build
- python setup.py install
-
-If you are using `MinGW `_ to build PyGreSQL under
-Microsoft Windows, please note that Python newer version 2.3 is using msvcr71
-instead of msvcrt as its common runtime library. You can allow for that by
-editing the file ``%MinGWpath%/lib/gcc/%MinGWversion%/specs`` and changing
-the entry that reads ``-lmsvcrt`` to ``-lmsvcr71``. You may also need to copy
-``libpq.lib`` to ``libpq.a`` in the PostgreSQL ``lib`` directory. Then use
-the following command to build and install PyGreSQL::
-
- python setup.py build -c mingw32 install
-
-Now you should be ready to use PyGreSQL.
-
-Compiling Manually
-------------------
-
-The source file for compiling the dynamic module is called pgmodule.c.
-You have two options. You can compile PyGreSQL as a stand-alone module
-or you can build it into the Python interpreter.
-
-Stand-Alone
------------
-
-* In the directory containing ``pgmodule.c``, run the following command::
-
- cc -fpic -shared -o _pg.so -I$PYINC -I$PGINC -I$PSINC -L$PGLIB -lpq pgmodule.c
-
- where you have to set::
-
- PYINC = path to the Python include files
- (usually something like /usr/include/python)
- PGINC = path to the PostgreSQL client include files
- (something like /usr/include/pgsql or /usr/include/postgresql)
- PSINC = path to the PostgreSQL server include files
- (like /usr/include/pgsql/server or /usr/include/postgresql/server)
- PGLIB = path to the PostgreSQL object code libraries (usually /usr/lib)
-
- If you are not sure about the above paths, try something like::
-
- PYINC=`find /usr -name Python.h`
- PGINC=`find /usr -name libpq-fe.h`
- PSINC=`find /usr -name postgres.h`
- PGLIB=`find /usr -name libpq.so`
-
- If you have the ``pg_config`` tool installed, you can set::
-
- PGINC=`pg_config --includedir`
- PSINC=`pg_config --includedir-server`
- PGLIB=`pg_config --libdir`
-
- Some options may be added to this line::
-
- -DNO_DEF_VAR no default variables support
- -DNO_DIRECT no direct access methods
- -DNO_LARGE no large object support
- -DNO_PQSOCKET if running an older PostgreSQL
-
- Define ``NO_PQSOCKET`` if you are using a version of PostgreSQL before 6.4
- that does not have the PQsocket function. The other options will be
- described in the next sections.
-
- On some systems you may need to include ``-lcrypt`` in the list of libraries
- to make it compile.
-
-* Test the new module. Something like the following should work::
-
- $ python
-
- >>> import _pg
- >>> db = _pg.connect('thilo','localhost')
- >>> db.query("INSERT INTO test VALUES ('ping','pong')")
- 18304
- >>> db.query("SELECT * FROM test")
- eins|zwei
- ----+----
- ping|pong
- (1 row)
-
-* Finally, move the ``_pg.so``, ``pg.py``, and ``pgdb.py`` to a directory in
- your ``PYTHONPATH``. A good place would be ``/usr/lib/python/site-packages``
- if your Python modules are in ``/usr/lib/python``.
-
-Built-in to Python interpreter
-------------------------------
-
-* Find the directory where your ``Setup`` file lives (usually in the ``Modules``
- subdirectory) in the Python source hierarchy and copy or symlink the
- ``pgmodule.c`` file there.
-
-* Add the following line to your 'Setup' file::
-
- _pg pgmodule.c -I$PGINC -I$PSINC -L$PGLIB -lpq
-
- where::
-
- PGINC = path to the PostgreSQL client include files (see above)
- PSINC = path to the PostgreSQL server include files (see above)
- PGLIB = path to the PostgreSQL object code libraries (see above)
-
- Some options may be added to this line::
-
- -DNO_DEF_VAR no default variables support
- -DNO_DIRECT no direct access methods
- -DNO_LARGE no large object support
- -DNO_PQSOCKET if running an older PostgreSQL (see above)
-
- On some systems you may need to include ``-lcrypt`` in the list of libraries
- to make it compile.
-
-* If you want a shared module, make sure that the ``shared`` keyword is
- uncommented and add the above line below it. You used to need to install
- your shared modules with ``make sharedinstall`` but this no longer seems
- to be true.
-
-* Copy ``pg.py`` to the lib directory where the rest of your modules are.
- For example, that's ``/usr/local/lib/Python`` on my system.
-
-* Rebuild Python from the root directory of the Python source hierarchy by
- running ``make -f Makefile.pre.in boot`` and ``make && make install``.
-
-* For more details read the documentation at the top of ``Makefile.pre.in``.
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.html
deleted file mode 100644
index 2e903789a75..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.html
+++ /dev/null
@@ -1,2429 +0,0 @@
-
-
-
-
-
-
-PyGreSQL Programming Information
-
-
-
-
-
-
The following documentation covers only the older pg API.
-
The pg module handles three types of objects,
-
-
the pgobject, which handles the connection
-and all the requests to the database,
-
the pglarge object, which handles
-all the accesses to PostgreSQL large objects,
-
the pgqueryobject that handles query results
-
-
and it provides a convenient wrapper class DB for the pgobject.
-
If you want to see a simple example of the use of some of these functions,
-see http://ontario.bikerides.ca where you can find a link at the bottom to the
-actual Python code for the page.
The pg module defines a few functions that allow to connect
-to a database and to define "default variables" that override
-the environment variables used by PostgreSQL.
-
These "default variables" were designed to allow you to handle general
-connection parameters without heavy code in your programs. You can prompt the
-user for a value, put it in the default variable, and forget it, without
-having to modify your environment. The support for default variables can be
-disabled by setting the -DNO_DEF_VAR option in the Python setup file. Methods
-relative to this are specified by the tag [DV].
-
All variables are set to None at module initialization, specifying that
-standard environment variables should be used.
If successful, the pgobject handling the connection
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
SyntaxError:
duplicate argument definition
-
-
pg.InternalError:
-
some error occurred during pg connection definition
-
-
-
-
(plus all exceptions relative to object allocation)
-
-
Description:
-
This function opens a connection to a specified database on a given
-PostgreSQL server. You can use keywords here, as described in the
-Python tutorial. The names of the keywords are the name of the
-parameters given in the syntax line. For a precise description
-of the parameters, please refer to the PostgreSQL user manual.
This method returns the current default host specification,
-or None if the environment variables should be used.
-Environment variables won't be looked up.
-
-
Syntax:
-
-set_defhost(host)
-
-
-
Parameters:
-
-
-
-
-
host:
new default host (string/None)
-
-
-
-
-
Return type:
-
-
-
-
-
string, None:
previous default host specification
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
This methods sets the default host value for new connections.
-If None is supplied as parameter, environment variables will
-be used in future connections. It returns the previous setting
-for default host.
This method returns the current default port specification,
-or None if the environment variables should be used.
-Environment variables won't be looked up.
-
-
Syntax:
-
-set_defport(port)
-
-
-
Parameters:
-
-
-
-
-
port:
new default port (integer/-1)
-
-
-
-
-
Return type:
-
-
-
-
-
integer, None:
previous default port specification
-
-
-
-
-
Description:
-
This methods sets the default port value for new connections. If -1 is
-supplied as parameter, environment variables will be used in future
-connections. It returns the previous setting for default port.
This method returns the current default connection options specification,
-or None if the environment variables should be used. Environment variables
-won't be looked up.
-
-
Syntax:
-
-set_defopt(options)
-
-
-
Parameters:
-
-
-
-
-
options:
new default connection options (string/None)
-
-
-
-
-
Return type:
-
-
-
-
-
string, None:
previous default options specification
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
This methods sets the default connection options value for new connections.
-If None is supplied as parameter, environment variables will be used in
-future connections. It returns the previous setting for default options.
This method returns the current default debug terminal specification, or
-None if the environment variables should be used. Environment variables
-won't be looked up.
-
-
Syntax:
-
-set_deftty(terminal)
-
-
-
Parameters:
-
-
-
-
-
terminal:
new default debug terminal (string/None)
-
-
-
-
-
Return type:
-
-
-
-
-
string, None:
previous default debug terminal specification
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
This methods sets the default debug terminal value for new connections. If
-None is supplied as parameter, environment variables will be used in future
-connections. It returns the previous setting for default terminal.
This method returns the current default database name specification, or
-None if the environment variables should be used. Environment variables
-won't be looked up.
-
-
Syntax:
-
-set_defbase(base)
-
-
-
Parameters:
-
-
-
-
-
base:
new default base name (string/None)
-
-
-
-
-
Return type:
-
-
-
-
-
string, None:
previous default database name specification
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
This method sets the default database name value for new connections. If
-None is supplied as parameter, environment variables will be used in
-future connections. It returns the previous setting for default host.
This function escapes a string for use within an SQL command.
-This is useful when inserting data values as literal constants
-in SQL commands. Certain characters (such as quotes and backslashes)
-must be escaped to prevent them from being interpreted specially
-by the SQL parser. escape_string performs this operation.
-Note that there is also a pgobject method with the same name
-which takes connection properties into account.
-
-
-
Caution!
-
It is especially important to do proper escaping when
-handling strings that were received from an untrustworthy source.
-Otherwise there is a security risk: you are vulnerable to "SQL injection"
-attacks wherein unwanted SQL commands are fed to your database.
-
-
Example:
-
-name = raw_input("Name? ")
-phone = con.query("select phone from employees"
- " where name='%s'" % escape_string(name)).getresult()
-
string containing the binary data that is to be escaped
-
-
-
-
-
Return type:
-
-
-
-
-
str:
the escaped string
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
Escapes binary data for use within an SQL command with the type bytea.
-As with escape_string, this is only used when inserting data directly
-into an SQL command string.
-Note that there is also a pgobject method with the same name
-which takes connection properties into account.
-
-
Example:
-
-picture = file('garfield.gif', 'rb').read()
-con.query("update pictures set img='%s' where name='Garfield'"
- % escape_bytea(picture))
-
the bytea data string that has been retrieved as text
-
-
-
-
-
Return type:
-
-
-
-
-
str:
string containing the binary data
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
bad argument type, or too many arguments
-
-
-
-
-
Description:
-
Converts an escaped string representation of binary data into binary
-data - the reverse of escape_bytea. This is needed when retrieving
-bytea data with the getresult() or dictresult() method.
-
-
Example:
-
-picture = unescape_bytea(con.query(
- "select img from pictures where name='Garfield'").getresult[0][0])
-file('garfield.gif', 'wb').write(picture)
-
the Python class to be used for PostgreSQL numeric values
-
-
-
-
-
Description:
-
This function can be used to specify the Python class that shall be
-used by PyGreSQL to hold PostgreSQL numeric values. The default class
-is decimal.Decimal if available, otherwise the float type is used.
Some constants are defined in the module dictionary.
-They are intended to be used as parameters for methods calls.
-You should refer to the libpq description in the PostgreSQL user manual
-for more information about them. These constants are:
-
-
-
-
-
version, __version__:
-
constants that give the current version.
-
-
INV_READ, INV_WRITE:
-
large objects access modes,
-used by (pgobject.)locreate and (pglarge.)open
This object handles a connection to a PostgreSQL database. It embeds and
-hides all the parameters that define this connection, thus just leaving really
-significant parameters in function calls.
-
-
Caution!
-
Some methods give direct access to the connection socket.
-Do not use them unless you really know what you are doing.
-If you prefer disabling them,
-set the -DNO_DIRECT option in the Python setup file.
-
These methods are specified by the tag [DA].
-
-
-
Note
-
Some other methods give access to large objects
-(refer to PostgreSQL user manual for more information about these).
-If you want to forbid access to these from the module,
-set the -DNO_LARGE option in the Python setup file.
This method simply sends a SQL query to the database. If the query is an
-insert statement that inserted exactly one row into a table that has OIDs, the
-return value is the OID of the newly inserted row. If the query is an update
-or delete statement, or an insert statement that did not insert exactly one
-row in a table with OIDs, then the numer of rows affected is returned as a
-string. If it is a statement that returns rows as a result (usually a select
-statement, but maybe also an "insert/update ... returning" statement), this
-method returns a pgqueryobject that can be accessed via the getresult()
-or dictresult() method or simply printed. Otherwise, it returns None.
This method closes the database connection. The connection will
-be closed in any case when the connection is deleted but this
-allows you to explicitly close it. It is mainly here to allow
-the DB-SIG API wrapper to implement a close function.
This methods try to get a notify from the server (from the SQL statement
-NOTIFY). If the server returns no notify, the methods returns None.
-Otherwise, it returns a tuple (couple) (relname, pid), where relname
-is the name of the notify and pid the process id of the connection that
-triggered the notify. Remember to do a listen query first otherwise
-getnotify() will always return None.
invalid connection, bad argument type, or too many arguments
-
-
MemoryError:
insert buffer could not be allocated
-
-
ValueError:
unsupported values
-
-
-
-
-
Description:
-
This method allow to quickly insert large blocks of data in a table:
-It inserts the whole values list into the given table. Internally, it
-uses the COPY command of the PostgreSQL database. The list is a list
-of tuples/lists that define the values for each inserted row. The rows
-values may contain string, integer, long or double (real) values.
-
-
-
Caution!
-
Be very careful:
-This method doesn't typecheck the fields according to the table definition;
-it just look whether or not it knows how to handle such types.
invalid connection, bad parameter type, or too many parameters
-
-
pg.OperationalError:
-
creation error
-
-
-
-
-
-
Description:
-
This method creates a large object in the database. The mode can be defined
-by OR-ing the constants defined in the pg module (INV_READ, INV_WRITE and
-INV_ARCHIVE). Please refer to PostgreSQL user manual for a description of
-the mode values.
The pgobject methods are wrapped in the class DB.
-The preferred way to use this module is as follows:
-
-import pg
-
-db = pg.DB(...) # see below
-
-for r in db.query( # just for example
- """SELECT foo,bar
- FROM foo_bar_table
- WHERE foo !~ bar"""
- ).dictresult():
-
- print '%(foo)s %(bar)s' % r
-
-
This class can be subclassed as in this example:
-
-import pg
-
-class DB_ride(pg.DB):
- """This class encapsulates the database functions and the specific
- methods for the ride database."""
-
- def __init__(self):
- """Opens a database connection to the rides database"""
-
- pg.DB.__init__(self, dbname = 'ride')
- self.query("""SET DATESTYLE TO 'ISO'""")
-
- [Add or override methods here]
-
-
The following describes the methods and variables of this class.
The DB class is initialized with the same arguments as the connect
-function described in section 2. It also initializes a few
-internal variables. The statement db = DB() will open the
-local database with the name of the user just like connect() does.
-
You can also initialize the DB class with an existing _pg or pgdb
-connection. Pass this connection as a single unnamed parameter, or as a
-single parameter named db. This allows you to use all of the methods
-of the DB class with a DB-API 2 compliant connection. Note that the
-close() and reopen() methods are inoperative in this case.
Name of the field which is the primary key of the table
-
-
-
-
-
Description:
-
This method returns the primary key of a table. For composite primary
-keys, the return value will be a frozenset. Note that this raises an
-exception if the table does not have a primary key.
The type letters are r = ordinary table, i = index, S = sequence,
-v = view, c = composite type, s = special, t = TOAST table.
-If kinds is None or an empty string, all relations are returned (this is
-also the default). Although you can do this with a simple select, it is
-added here for convenience.
The keys are the attribute names,
-the values are the row values.
-
-
-
-
-
Description:
-
This method is the basic mechanism to get a single row. It assumes
-that the key specifies a unique row. If keyname is not specified
-then the primary key for the table is used. If arg is a dictionary
-then the value for the key is taken from it and it is modified to
-include the new values, replacing existing values where necessary.
-For a composite key, keyname can also be a sequence of key names.
-The OID is also put into the dictionary if the table has one, but in
-order to allow the caller to work with multiple tables, it is munged
-as oid(schema.table).
This method inserts a row into a table. If the optional dictionary is
-not supplied then the required values must be included as keyword/value
-pairs. If a dictionary is supplied then any keywords provided will be
-added to or replace the entry in the dictionary.
-
The dictionary is then, if possible, reloaded with the values actually
-inserted in order to pick up values modified by rules, triggers, etc.
-
Due to the way that this function works in PostgreSQL versions below
-8.2, you may find inserts taking longer and longer as your table gets
-bigger. If this happens and it is a table with OID but no primary key
-you can overcome this problem by simply adding an index onto the OID of
-any table that you think may get large over time. You may also consider
-using the inserttable() method described in section 3.
-
Note: With PostgreSQL versions before 8.2 the table being inserted to
-must have a primary key or an OID to use this method properly. If not
-then the dictionary will not be filled in as described. Also, if this
-method is called within a transaction, the transaction will abort.
-
Note: The method currently doesn't support insert into views
-although PostgreSQL does.
Similar to insert but updates an existing row. The update is based on the
-OID value as munged by get or passed as keyword, or on the primary key of
-the table. The dictionary is modified, if possible, to reflect any changes
-caused by the update due to triggers, rules, default values, etc.
-
Like insert, the dictionary is optional and updates will be performed
-on the fields in the keywords. There must be an OID or primary key
-either in the dictionary where the OID must be munged, or in the keywords
-where it can be simply the string "oid".
This method clears all the attributes to values determined by the types.
-Numeric types are set to 0, Booleans are set to 'f', dates are set
-to 'now()' and everything else is set to the empty string.
-If the array argument is present, it is used as the array and any entries
-matching attribute names are cleared with everything else left unchanged.
-
If the dictionary is not supplied a new one is created.
This method deletes the row from a table. It deletes based on the OID value
-as munged by get or passed as keyword, or on the primary key of the table.
-The return value is the number of deleted rows (i.e. 0 if the row did not
-exist and 1 if the row was deleted).
Similar to the module function with the same name, but the
-behavior of this method is adjusted depending on the connection properties
-(such as character encoding).
string containing the binary data that is to be escaped
-
-
-
-
-
Return type:
-
-
-
-
-
str:
the escaped string
-
-
-
-
-
Description:
-
Similar to the module function with the same name, but the
-behavior of this method is adjusted depending on the connection properties
-(in particular, whether standard-conforming strings are enabled).
This method returns the list of the values returned by the query.
-More information about this result may be accessed using listfields(),
-fieldname() and fieldnum() methods.
This method returns the list of the values returned by the query
-with each tuple returned as a dictionary with the field names
-used as the dictionary index.
invalid connection, bad parameter type, or too many parameters
-
-
ValueError:
invalid field number
-
-
pg.InternalError:
-
invalid previous result, or lost connection
-
-
-
-
-
Description:
-
This method allows to find a field name from its rank number. It can be
-useful for displaying a result. The fields are in the same order as the
-result values.
-
-
Syntax:
-
-fieldnum(name)
-
-
-
Parameters:
-
-
-
-
-
name:
field name (string)
-
-
-
-
-
Return type:
-
-
-
-
-
integer:
field number
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
invalid connection, bad parameter type, or too many parameters
-
-
ValueError:
unknown field name
-
-
pg.InternalError:
-
invalid previous result, or lost connection
-
-
-
-
-
Description:
-
This method returns a field number from its name. It can be used to
-build a function that converts result list strings to their correct
-type, using a hardcoded table definition. The number returned is the
-field rank in the result values list.
This object handles all the request concerning a PostgreSQL large object. It
-embeds and hides all the "recurrent" variables (object OID and connection),
-exactly in the same way pgobjects do, thus only keeping significant
-parameters in function calls. It keeps a reference to the pgobject used for
-its creation, sending requests though with its parameters. Any modification but
-dereferencing the pgobject will thus affect the pglarge object.
-Dereferencing the initial pgobject is not a problem since Python won't
-deallocate it before the pglarge object dereference it.
-All functions return a generic error message on call error, whatever the
-exact error was. The error attribute of the object allow to get the exact
-error message.
-
See also the PostgreSQL programmer's guide for more information about the
-large object interface.
invalid connection, bad parameter type, or too many parameters
-
-
IOError:
already opened object, or open error
-
-
-
-
-
Description:
-
This method opens a large object for reading/writing, in the same way than
-the Unix open() function. The mode value can be obtained by OR-ing the
-constants defined in the pgmodule (INV_READ, INV_WRITE).
invalid connection, invalid object,
-bad parameter type, or too many parameters
-
-
ValueError:
if size is negative
-
-
IOError:
object is not opened, or read error
-
-
-
-
-
Description:
-
This function allows to read data from a large object, starting at current
-position.
-
-
Syntax:
-
-write(string)
-
-
-
Parameters:
-
(sized) string - buffer to be written
-
Return type:
-
None
-
Exceptions raised:
-
-
-
-
-
TypeError:
invalid connection, bad parameter type, or too many parameters
-
-
IOError:
object is not opened, or write error
-
-
-
-
-
Description:
-
This function allows to write data to a large object, starting at current
-position.
-
-
Syntax:
-
-seek(offset, whence)
-
-
-
Parameters:
-
-
-
-
-
offset:
position offset
-
-
whence:
positional parameter
-
-
-
-
-
Return type:
-
-
-
-
-
integer:
new position in object
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
binvalid connection or invalid object,
-bad parameter type, or too many parameters
-
-
IOError:
object is not opened, or seek error
-
-
-
-
-
Description:
-
This method allows to move the position cursor in the large object. The
-whence parameter can be obtained by OR-ing the constants defined in the
-pg module (SEEK_SET, SEEK_CUR, SEEK_END).
-
-
Syntax:
-
-tell()
-
-
-
Parameters:
-
None
-
Return type:
-
-
-
-
-
integer:
current position in large object
-
-
-
-
-
Exceptions raised:
-
-
-
-
-
TypeError:
invalid connection or invalid object
-
-
TypeError:
too many parameters
-
-
IOError:
object is not opened, or seek error
-
-
-
-
-
Description:
-
This method allows to get the current position in the large object.
-
-
Syntax:
-
-unlink()
-
-
-
Parameter:
-
None
-
Return type:
-
None
-
Exceptions raised:
-
-
-
-
-
TypeError:
invalid connection or invalid object
-
-
TypeError:
too many parameters
-
-
IOError:
object is not closed, or unlink error
-
-
-
-
-
Description:
-
This methods unlinks (deletes) the PostgreSQL large object.
This (composite) method allows to get the size of a large object. It was
-implemented because this function is very useful for a web interfaced
-database. Currently, the large object needs to be opened first.
invalid connection or invalid object,
-bad parameter type, or too many parameters
-
-
IOError:
object is not closed, or export error
-
-
-
-
-
Description:
-
This methods allows to dump the content of a large object in a very simple
-way. The exported file is created on the host of the program, not the
-server host.
pglarge objects define a read-only set of attributes that allow to get
-some information about it. These attributes are:
-
-
-
-
-
-
oid:
the OID associated with the object
-
-
pgcnx:
the pgobject associated with the object
-
-
error:
the last warning/error message of the connection
-
-
-
-
-
-
Caution!
-
Be careful:
-In multithreaded environments, error may be modified by another thread
-using the same pgobject. Remember these object are shared, not duplicated.
-You should provide some locking to be able if you want to check this.
-The oid attribute is very interesting because it allow you reuse the OID
-later, creating the pglarge object with a pgobject getlo() method call.
-
-
-
-
-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.txt
deleted file mode 100644
index ce98629abcb..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pg.txt
+++ /dev/null
@@ -1,1382 +0,0 @@
-================================
-PyGreSQL Programming Information
-================================
-
-------------------------------------------
-The classic PyGreSQL interface (pg module)
-------------------------------------------
-
-.. meta::
- :description: The classic PyGreSQL interface (pg module)
- :keywords: PyGreSQL, pg, PostGreSQL, Python
-
-.. sectnum::
-.. contents:: Contents
-
-
-Introduction
-============
-You may either choose to use the
-`"classic" PyGreSQL interface `_
-provided by the `pg` module or else the
-`DB-API 2.0 compliant interface `_
-provided by the `pgdb` module.
-
-The following documentation covers only the older `pg` API.
-
-The `pg` module handles three types of objects,
-
-- the `pgobject`, which handles the connection
- and all the requests to the database,
-- the `pglarge` object, which handles
- all the accesses to PostgreSQL large objects,
-- the `pgqueryobject` that handles query results
-
-and it provides a convenient wrapper class `DB` for the `pgobject`.
-
-If you want to see a simple example of the use of some of these functions,
-see http://ontario.bikerides.ca where you can find a link at the bottom to the
-actual Python code for the page.
-
-
-Module functions and constants
-==============================
-The `pg` module defines a few functions that allow to connect
-to a database and to define "default variables" that override
-the environment variables used by PostgreSQL.
-
-These "default variables" were designed to allow you to handle general
-connection parameters without heavy code in your programs. You can prompt the
-user for a value, put it in the default variable, and forget it, without
-having to modify your environment. The support for default variables can be
-disabled by setting the -DNO_DEF_VAR option in the Python setup file. Methods
-relative to this are specified by the tag [DV].
-
-All variables are set to `None` at module initialization, specifying that
-standard environment variables should be used.
-
-connect - opens a pg connection
--------------------------------
-Syntax::
-
- connect([dbname], [host], [port], [opt], [tty], [user], [passwd])
-
-Parameters:
- :dbname: name of connected database (string/None)
- :host: name of the server host (string/None)
- :port: port used by the database server (integer/-1)
- :opt: connection options (string/None)
- :tty: debug terminal (string/None)
- :user: PostgreSQL user (string/None)
- :passwd: password for user (string/None)
-
-Return type:
- :pgobject: If successful, the `pgobject` handling the connection
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
- :SyntaxError: duplicate argument definition
- :pg.InternalError: some error occurred during pg connection definition
-
- (plus all exceptions relative to object allocation)
-
-Description:
- This function opens a connection to a specified database on a given
- PostgreSQL server. You can use keywords here, as described in the
- Python tutorial. The names of the keywords are the name of the
- parameters given in the syntax line. For a precise description
- of the parameters, please refer to the PostgreSQL user manual.
-
-Examples::
-
- import pg
-
- con1 = pg.connect('testdb', 'myhost', 5432, None, None, 'bob', None)
- con2 = pg.connect(dbname='testdb', host='localhost', user='bob')
-
-get_defhost, set_defhost - default server host [DV]
----------------------------------------------------
-Syntax::
-
- get_defhost()
-
-Parameters:
- None
-
-Return type:
- :string, None: default host specification
-
-Exceptions raised:
- :TypeError: too many arguments
-
-Description:
- This method returns the current default host specification,
- or `None` if the environment variables should be used.
- Environment variables won't be looked up.
-
-Syntax::
-
- set_defhost(host)
-
-Parameters:
- :host: new default host (string/None)
-
-Return type:
- :string, None: previous default host specification
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- This methods sets the default host value for new connections.
- If `None` is supplied as parameter, environment variables will
- be used in future connections. It returns the previous setting
- for default host.
-
-get_defport, set_defport - default server port [DV]
----------------------------------------------------
-Syntax::
-
- get_defport()
-
-Parameters:
- None
-
-Return type:
- :integer, None: default port specification
-
-Exceptions raised:
- :TypeError: too many arguments
-
-Description:
- This method returns the current default port specification,
- or `None` if the environment variables should be used.
- Environment variables won't be looked up.
-
-Syntax::
-
- set_defport(port)
-
-Parameters:
- :port: new default port (integer/-1)
-
-Return type:
- :integer, None: previous default port specification
-
-Description:
- This methods sets the default port value for new connections. If -1 is
- supplied as parameter, environment variables will be used in future
- connections. It returns the previous setting for default port.
-
-get_defopt, set_defopt - default connection options [DV]
---------------------------------------------------------
-Syntax::
-
- get_defopt()
-
-Parameters:
- None
-
-Return type:
- :string, None: default options specification
-
-Exceptions raised:
- :TypeError: too many arguments
-
-Description:
- This method returns the current default connection options specification,
- or `None` if the environment variables should be used. Environment variables
- won't be looked up.
-
-Syntax::
-
- set_defopt(options)
-
-Parameters:
- :options: new default connection options (string/None)
-
-Return type:
- :string, None: previous default options specification
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- This methods sets the default connection options value for new connections.
- If `None` is supplied as parameter, environment variables will be used in
- future connections. It returns the previous setting for default options.
-
-get_deftty, set_deftty - default debug tty [DV]
------------------------------------------------
-Syntax::
-
- get_deftty()
-
-Parameters:
- None
-
-Return type:
- :string, None: default debug terminal specification
-
-Exceptions raised:
- :TypeError: too many arguments
-
-Description:
- This method returns the current default debug terminal specification, or
- `None` if the environment variables should be used. Environment variables
- won't be looked up.
-
-Syntax::
-
- set_deftty(terminal)
-
-Parameters:
- :terminal: new default debug terminal (string/None)
-
-Return type:
- :string, None: previous default debug terminal specification
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- This methods sets the default debug terminal value for new connections. If
- `None` is supplied as parameter, environment variables will be used in future
- connections. It returns the previous setting for default terminal.
-
-get_defbase, set_defbase - default database name [DV]
------------------------------------------------------
-Syntax::
-
- get_defbase()
-
-Parameters:
- None
-
-Return type:
- :string, None: default database name specification
-
-Exceptions raised:
- :TypeError: too many arguments
-
-Description:
- This method returns the current default database name specification, or
- `None` if the environment variables should be used. Environment variables
- won't be looked up.
-
-Syntax::
-
- set_defbase(base)
-
-Parameters:
- :base: new default base name (string/None)
-
-Return type:
- :string, None: previous default database name specification
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- This method sets the default database name value for new connections. If
- `None` is supplied as parameter, environment variables will be used in
- future connections. It returns the previous setting for default host.
-
-escape_string - escape a string for use within SQL
---------------------------------------------------
-Syntax::
-
- escape_string(string)
-
-Parameters:
- :string: the string that is to be escaped
-
-Return type:
- :str: the escaped string
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- This function escapes a string for use within an SQL command.
- This is useful when inserting data values as literal constants
- in SQL commands. Certain characters (such as quotes and backslashes)
- must be escaped to prevent them from being interpreted specially
- by the SQL parser. `escape_string` performs this operation.
- Note that there is also a `pgobject` method with the same name
- which takes connection properties into account.
-
-.. caution:: It is especially important to do proper escaping when
- handling strings that were received from an untrustworthy source.
- Otherwise there is a security risk: you are vulnerable to "SQL injection"
- attacks wherein unwanted SQL commands are fed to your database.
-
-Example::
-
- name = raw_input("Name? ")
- phone = con.query("select phone from employees"
- " where name='%s'" % escape_string(name)).getresult()
-
-escape_bytea - escape binary data for use within SQL as type `bytea`
---------------------------------------------------------------------
-Syntax::
-
- escape_bytea(datastring)
-
-Parameters:
- :datastring: string containing the binary data that is to be escaped
-
-Return type:
- :str: the escaped string
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- Escapes binary data for use within an SQL command with the type `bytea`.
- As with `escape_string`, this is only used when inserting data directly
- into an SQL command string.
- Note that there is also a `pgobject` method with the same name
- which takes connection properties into account.
-
-Example::
-
- picture = file('garfield.gif', 'rb').read()
- con.query("update pictures set img='%s' where name='Garfield'"
- % escape_bytea(picture))
-
-unescape_bytea -- unescape `bytea` data that has been retrieved as text
------------------------------------------------------------------------
-Syntax::
-
- unescape_bytea(string)
-
-Parameters:
- :datastring: the `bytea` data string that has been retrieved as text
-
-Return type:
- :str: string containing the binary data
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
-
-Description:
- Converts an escaped string representation of binary data into binary
- data - the reverse of `escape_bytea`. This is needed when retrieving
- `bytea` data with the `getresult()` or `dictresult()` method.
-
-Example::
-
- picture = unescape_bytea(con.query(
- "select img from pictures where name='Garfield'").getresult[0][0])
- file('garfield.gif', 'wb').write(picture)
-
-set_decimal -- set a decimal type to be used for numeric values
----------------------------------------------------------------
-Syntax::
-
- set_decimal(cls)
-
-Parameters:
- :cls: the Python class to be used for PostgreSQL numeric values
-
-Description:
- This function can be used to specify the Python class that shall be
- used by PyGreSQL to hold PostgreSQL numeric values. The default class
- is decimal.Decimal if available, otherwise the float type is used.
-
-Module constants
-----------------
-Some constants are defined in the module dictionary.
-They are intended to be used as parameters for methods calls.
-You should refer to the libpq description in the PostgreSQL user manual
-for more information about them. These constants are:
-
-:version, __version__: constants that give the current version.
-:INV_READ, INV_WRITE: large objects access modes,
- used by `(pgobject.)locreate` and `(pglarge.)open`
-:SEEK_SET, SEEK_CUR, SEEK_END: positional flags,
- used by `(pglarge.)seek`
-
-
-Connection objects: pgobject
-============================
-This object handles a connection to a PostgreSQL database. It embeds and
-hides all the parameters that define this connection, thus just leaving really
-significant parameters in function calls.
-
-.. caution:: Some methods give direct access to the connection socket.
- *Do not use them unless you really know what you are doing.*
- If you prefer disabling them,
- set the -DNO_DIRECT option in the Python setup file.
-
- **These methods are specified by the tag [DA].**
-
-.. note:: Some other methods give access to large objects
- (refer to PostgreSQL user manual for more information about these).
- If you want to forbid access to these from the module,
- set the -DNO_LARGE option in the Python setup file.
-
- **These methods are specified by the tag [LO].**
-
-query - executes a SQL command string
--------------------------------------
-Syntax::
-
- query(command)
-
-Parameters:
- :command: SQL command (string)
-
-Return type:
- :pgqueryobject, None: result values
-
-Exceptions raised:
- :TypeError: bad argument type, or too many arguments
- :ValueError: empty SQL query or lost connection
- :pg.ProgrammingError: error in query
- :pg.InternalError': error during query processing
-
-Description:
- This method simply sends a SQL query to the database. If the query is an
- insert statement that inserted exactly one row into a table that has OIDs, the
- return value is the OID of the newly inserted row. If the query is an update
- or delete statement, or an insert statement that did not insert exactly one
- row in a table with OIDs, then the numer of rows affected is returned as a
- string. If it is a statement that returns rows as a result (usually a select
- statement, but maybe also an "insert/update ... returning" statement), this
- method returns a `pgqueryobject` that can be accessed via the `getresult()`
- or `dictresult()` method or simply printed. Otherwise, it returns `None`.
-
-reset - resets the connection
------------------------------
-Syntax::
-
- reset()
-
-Parameters:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: too many (any) arguments
-
-Description:
- This method resets the current database connection.
-
-cancel - abandon processing of current SQL command
---------------------------------------------------
-Syntax::
-
- cancel()
-
-Parameters:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: too many (any) arguments
-
-Description:
- This method requests that the server abandon processing
- of the current SQL command.
-
-close - close the database connection
--------------------------------------
-Syntax::
-
- close()
-
-Parameters:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: too many (any) arguments
-
-Description:
- This method closes the database connection. The connection will
- be closed in any case when the connection is deleted but this
- allows you to explicitly close it. It is mainly here to allow
- the DB-SIG API wrapper to implement a close function.
-
-fileno - returns the socket used to connect to the database
------------------------------------------------------------
-Syntax::
-
- fileno()
-
-Parameters:
- None
-
-Exceptions raised:
- :TypeError: too many (any) arguments
-
-Description:
- This method returns the underlying socket id used to connect
- to the database. This is useful for use in select calls, etc.
-
-getnotify - gets the last notify from the server
-------------------------------------------------
-Syntax::
-
- getnotify()
-
-Parameters:
- None
-
-Return type:
- :tuple, None: last notify from server
-
-Exceptions raised:
- :TypeError: too many parameters
- :TypeError: invalid connection
-
-Description:
- This methods try to get a notify from the server (from the SQL statement
- NOTIFY). If the server returns no notify, the methods returns None.
- Otherwise, it returns a tuple (couple) `(relname, pid)`, where `relname`
- is the name of the notify and `pid` the process id of the connection that
- triggered the notify. Remember to do a listen query first otherwise
- getnotify() will always return `None`.
-
-inserttable - insert a list into a table
-----------------------------------------
-Syntax::
-
- inserttable(table, values)
-
-Parameters:
- :table: the table name (string)
- :values: list of rows values (list)
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection, bad argument type, or too many arguments
- :MemoryError: insert buffer could not be allocated
- :ValueError: unsupported values
-
-Description:
- This method allow to *quickly* insert large blocks of data in a table:
- It inserts the whole values list into the given table. Internally, it
- uses the COPY command of the PostgreSQL database. The list is a list
- of tuples/lists that define the values for each inserted row. The rows
- values may contain string, integer, long or double (real) values.
-
-.. caution:: *Be very careful*:
- This method doesn't typecheck the fields according to the table definition;
- it just look whether or not it knows how to handle such types.
-
-putline - writes a line to the server socket [DA]
--------------------------------------------------
-Syntax::
-
- putline(line)
-
-Parameters:
- :line: line to be written (string)
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
-
-Description:
- This method allows to directly write a string to the server socket.
-
-getline - gets a line from server socket [DA]
----------------------------------------------
-Syntax::
-
- getline()
-
-Parameters:
- None
-
-Return type:
- :string: the line read
-
-Exceptions raised:
- :TypeError: invalid connection
- :TypeError: too many parameters
- :MemoryError: buffer overflow
-
-Description:
- This method allows to directly read a string from the server socket.
-
-endcopy - synchronizes client and server [DA]
----------------------------------------------
-Syntax::
-
- endcopy()
-
-Parameters:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection
- :TypeError: too many parameters
-
-Description:
- The use of direct access methods may desynchonize client and server.
- This method ensure that client and server will be synchronized.
-
-locreate - create a large object in the database [LO]
------------------------------------------------------
-Syntax::
-
- locreate(mode)
-
-Parameters:
- :mode: large object create mode
-
-Return type:
- :pglarge: object handling the PostGreSQL large object
-
-Exceptions raised:
-
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :pg.OperationalError: creation error
-
-Description:
- This method creates a large object in the database. The mode can be defined
- by OR-ing the constants defined in the pg module (INV_READ, INV_WRITE and
- INV_ARCHIVE). Please refer to PostgreSQL user manual for a description of
- the mode values.
-
-getlo - build a large object from given oid [LO]
-------------------------------------------------
-Syntax::
-
- getlo(oid)
-
-Parameters:
- :oid: OID of the existing large object (integer)
-
-Return type:
- :pglarge: object handling the PostGreSQL large object
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :ValueError: bad OID value (0 is invalid_oid)
-
-Description:
- This method allows to reuse a formerly created large object through the
- `pglarge` interface, providing the user have its OID.
-
-loimport - import a file to a large object [LO]
------------------------------------------------
-Syntax::
-
- loimport(name)
-
-Parameters:
- :name: the name of the file to be imported (string)
-
-Return type:
- :pglarge: object handling the PostGreSQL large object
-
-Exceptions raised:
- :TypeError: invalid connection, bad argument type, or too many arguments
- :pg.OperationalError: error during file import
-
-Description:
- This methods allows to create large objects in a very simple way. You just
- give the name of a file containing the data to be use.
-
-Object attributes
------------------
-Every `pgobject` defines a set of read-only attributes that describe the
-connection and its status. These attributes are:
-
- :host: the host name of the server (string)
- :port: the port of the server (integer)
- :db: the selected database (string)
- :options: the connection options (string)
- :tty: the connection debug terminal (string)
- :user: user name on the database system (string)
- :protocol_version: the frontend/backend protocol being used (integer)
- :server_version: the backend version (integer, e.g. 80305 for 8.3.5)
- :status: the status of the connection (integer: 1 - OK, 0 - bad)
- :error: the last warning/error message from the server (string)
-
-
-The DB wrapper class
-====================
-The `pgobject` methods are wrapped in the class `DB`.
-The preferred way to use this module is as follows::
-
- import pg
-
- db = pg.DB(...) # see below
-
- for r in db.query( # just for example
- """SELECT foo,bar
- FROM foo_bar_table
- WHERE foo !~ bar"""
- ).dictresult():
-
- print '%(foo)s %(bar)s' % r
-
-This class can be subclassed as in this example::
-
- import pg
-
- class DB_ride(pg.DB):
- """This class encapsulates the database functions and the specific
- methods for the ride database."""
-
- def __init__(self):
- """Opens a database connection to the rides database"""
-
- pg.DB.__init__(self, dbname = 'ride')
- self.query("""SET DATESTYLE TO 'ISO'""")
-
- [Add or override methods here]
-
-The following describes the methods and variables of this class.
-
-Initialization
---------------
-The DB class is initialized with the same arguments as the connect
-function described in section 2. It also initializes a few
-internal variables. The statement `db = DB()` will open the
-local database with the name of the user just like connect() does.
-
-You can also initialize the DB class with an existing `_pg` or `pgdb`
-connection. Pass this connection as a single unnamed parameter, or as a
-single parameter named `db`. This allows you to use all of the methods
-of the DB class with a DB-API 2 compliant connection. Note that the
-`close()` and `reopen()` methods are inoperative in this case.
-
-
-
-pkey - return the primary key of a table
-----------------------------------------
-Syntax::
-
- pkey(table)
-
-Parameters:
- :table: name of table
-
-Return type:
- :string: Name of the field which is the primary key of the table
-
-Description:
- This method returns the primary key of a table. For composite primary
- keys, the return value will be a frozenset. Note that this raises an
- exception if the table does not have a primary key.
-
-get_databases - get list of databases in the system
----------------------------------------------------
-Syntax::
-
- get_databases()
-
-Parameters:
- None
-
-Return type:
- :list: all databases in the system
-
-Description:
- Although you can do this with a simple select, it is added here for
- convenience.
-
-get_relations - get list of relations in connected database
------------------------------------------------------------
-Syntax::
-
- get_relations(kinds)
-
-Parameters:
- :kinds: a string or sequence of type letters
-
-Description:
- The type letters are `r` = ordinary table, `i` = index, `S` = sequence,
- `v` = view, `c` = composite type, `s` = special, `t` = TOAST table.
- If `kinds` is None or an empty string, all relations are returned (this is
- also the default). Although you can do this with a simple select, it is
- added here for convenience.
-
-get_tables - get list of tables in connected database
------------------------------------------------------
-Syntax::
-
- get_tables()
-
-Parameters:
- None
-
-Returns:
- :list: all tables in connected database
-
-Description:
- Although you can do this with a simple select, it is added here for
- convenience.
-
-get_attnames - get the attribute names of a table
--------------------------------------------------
-Syntax::
-
- get_attnames(table)
-
-Parameters:
- :table: name of table
-
-Returns:
- :dictionary: The keys are the attribute names,
- the values are the type names of the attributes.
-
-Description:
- Given the name of a table, digs out the set of attribute names.
-
-has_table_privilege - check whether current user has specified table privilege
-------------------------------------------------------------------------------
-Syntax::
-
- has_table_privilege(table, privilege)
-
-Parameters:
- :table: name of table
- :privilege: privilege to be checked - default is 'select'
-
-Description:
- Returns True if the current user has the specified privilege for the table.
-
-get - get a row from a database table or view
----------------------------------------------
-Syntax::
-
- get(table, arg, [keyname])
-
-Parameters:
- :table: name of table or view
- :arg: either a dictionary or the value to be looked up
- :keyname: name of field to use as key (optional)
-
-Return type:
- :dictionary: The keys are the attribute names,
- the values are the row values.
-
-Description:
- This method is the basic mechanism to get a single row. It assumes
- that the key specifies a unique row. If `keyname` is not specified
- then the primary key for the table is used. If `arg` is a dictionary
- then the value for the key is taken from it and it is modified to
- include the new values, replacing existing values where necessary.
- For a composite key, `keyname` can also be a sequence of key names.
- The OID is also put into the dictionary if the table has one, but in
- order to allow the caller to work with multiple tables, it is munged
- as `oid(schema.table)`.
-
-insert - insert a row into a database table
--------------------------------------------
-Syntax::
-
- insert(table, [d,] [return_changes,] [key = val, ...])
-
-Parameters:
- :table: name of table
- :d: optional dictionary of values
- :return_changes: Return values in new row - default True
-
-Return type:
- :dictionary: The dictionary of values inserted
-
-Description:
- This method inserts a row into a table. If the optional dictionary is
- not supplied then the required values must be included as keyword/value
- pairs. If a dictionary is supplied then any keywords provided will be
- added to or replace the entry in the dictionary.
-
- The dictionary is then, if possible, reloaded with the values actually
- inserted in order to pick up values modified by rules, triggers, etc.
-
- Due to the way that this function works in PostgreSQL versions below
- 8.2, you may find inserts taking longer and longer as your table gets
- bigger. If this happens and it is a table with OID but no primary key
- you can overcome this problem by simply adding an index onto the OID of
- any table that you think may get large over time. You may also consider
- using the inserttable() method described in section 3.
-
- Note: With PostgreSQL versions before 8.2 the table being inserted to
- must have a primary key or an OID to use this method properly. If not
- then the dictionary will not be filled in as described. Also, if this
- method is called within a transaction, the transaction will abort.
-
- Note: The method currently doesn't support insert into views
- although PostgreSQL does.
-
-update - update a row in a database table
------------------------------------------
-Syntax::
-
- update(table, [d,] [key = val, ...])
-
-Parameters:
- :table: name of table
- :d: optional dictionary of values
-
-Return type:
- :dictionary: the new row
-
-Description:
- Similar to insert but updates an existing row. The update is based on the
- OID value as munged by get or passed as keyword, or on the primary key of
- the table. The dictionary is modified, if possible, to reflect any changes
- caused by the update due to triggers, rules, default values, etc.
-
- Like insert, the dictionary is optional and updates will be performed
- on the fields in the keywords. There must be an OID or primary key
- either in the dictionary where the OID must be munged, or in the keywords
- where it can be simply the string "oid".
-
-clear - clears row values in memory
------------------------------------
-Syntax::
-
- clear(table, [a])
-
-Parameters:
- :table: name of table
- :a: optional dictionary of values
-
-Return type:
- :dictionary: an empty row
-
-Description:
- This method clears all the attributes to values determined by the types.
- Numeric types are set to 0, Booleans are set to 'f', dates are set
- to 'now()' and everything else is set to the empty string.
- If the array argument is present, it is used as the array and any entries
- matching attribute names are cleared with everything else left unchanged.
-
- If the dictionary is not supplied a new one is created.
-
-delete - delete a row from a database table
--------------------------------------------
-Syntax::
-
- delete(table, [d,] [key = val, ...])
-
-Parameters:
- :table: name of table
- :d: optional dictionary of values
-
-Returns:
- None
-
-Description:
- This method deletes the row from a table. It deletes based on the OID value
- as munged by get or passed as keyword, or on the primary key of the table.
- The return value is the number of deleted rows (i.e. 0 if the row did not
- exist and 1 if the row was deleted).
-
-escape_string - escape a string for use within SQL
---------------------------------------------------
-Syntax::
-
- escape_string(string)
-
-Parameters:
- :string: the string that is to be escaped
-
-Return type:
- :str: the escaped string
-
-Description:
- Similar to the module function with the same name, but the
- behavior of this method is adjusted depending on the connection properties
- (such as character encoding).
-
-escape_bytea - escape binary data for use within SQL as type `bytea`
---------------------------------------------------------------------
-Syntax::
-
- escape_bytea(datastring)
-
-Parameters:
- :datastring: string containing the binary data that is to be escaped
-
-Return type:
- :str: the escaped string
-
-Description:
- Similar to the module function with the same name, but the
- behavior of this method is adjusted depending on the connection properties
- (in particular, whether standard-conforming strings are enabled).
-
-unescape_bytea -- unescape `bytea` data that has been retrieved as text
------------------------------------------------------------------------
-Syntax::
-
- unescape_bytea(string)
-
-Parameters:
- :datastring: the `bytea` data string that has been retrieved as text
-
-Return type:
- :str: string containing the binary data
-
-Description:
- See the module function with the same name.
-
-
-pgqueryobject methods
-=====================
-
-getresult - get query values as list of tuples
------------------------------------------------
-Syntax::
-
- getresult()
-
-Parameters:
- None
-
-Return type:
- :list: result values as a list of tuples
-
-Exceptions raised:
- :TypeError: too many parameters
- :pg.InternalError: invalid previous result
-
-Description:
- This method returns the list of the values returned by the query.
- More information about this result may be accessed using listfields(),
- fieldname() and fieldnum() methods.
-
-dictresult - get query values as list of dictionaries
------------------------------------------------------
-Syntax::
-
- dictresult()
-
-Parameters:
- None
-
-Return type:
- :list: result values as a list of dictionaries
-
-Exceptions raised:
- :TypeError: too many parameters
- :pg.InternalError: invalid previous result
-
-Description:
- This method returns the list of the values returned by the query
- with each tuple returned as a dictionary with the field names
- used as the dictionary index.
-
-
-listfields - lists fields names of previous query result
---------------------------------------------------------
-Syntax::
-
- listfields()
-
-Parameters:
- None
-
-Return type:
- :list: field names
-
-Exceptions raised:
- :TypeError: too many parameters
- :pg.InternalError: invalid previous result, or lost connection
-
-Description:
- This method returns the list of names of the fields defined for the
- query result. The fields are in the same order as the result values.
-
-fieldname, fieldnum - field name/number conversion
---------------------------------------------------
-Syntax::
-
- fieldname(i)
-
-Parameters:
- :i: field number (integer)
-
-Return type:
- :string: field name
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :ValueError: invalid field number
- :pg.InternalError: invalid previous result, or lost connection
-
-Description:
- This method allows to find a field name from its rank number. It can be
- useful for displaying a result. The fields are in the same order as the
- result values.
-
-Syntax::
-
- fieldnum(name)
-
-Parameters:
- :name: field name (string)
-
-Return type:
- :integer: field number
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :ValueError: unknown field name
- :pg.InternalError: invalid previous result, or lost connection
-
-Description:
- This method returns a field number from its name. It can be used to
- build a function that converts result list strings to their correct
- type, using a hardcoded table definition. The number returned is the
- field rank in the result values list.
-
-ntuples - return number of tuples in query object
--------------------------------------------------
-Syntax::
-
- ntuples()
-
-Parameters:
- None
-
-Return type:
- :integer: number of tuples in `pgqueryobject`
-
-Exceptions raised:
- :TypeError: Too many arguments.
-
-Description:
- This method returns the number of tuples found in a query.
-
-
-Large objects: pglarge
-======================
-This object handles all the request concerning a PostgreSQL large object. It
-embeds and hides all the "recurrent" variables (object OID and connection),
-exactly in the same way `pgobjects` do, thus only keeping significant
-parameters in function calls. It keeps a reference to the `pgobject` used for
-its creation, sending requests though with its parameters. Any modification but
-dereferencing the `pgobject` will thus affect the `pglarge` object.
-Dereferencing the initial `pgobject` is not a problem since Python won't
-deallocate it before the `pglarge` object dereference it.
-All functions return a generic error message on call error, whatever the
-exact error was. The `error` attribute of the object allow to get the exact
-error message.
-
-See also the PostgreSQL programmer's guide for more information about the
-large object interface.
-
-open - opens a large object
----------------------------
-Syntax::
-
- open(mode)
-
-Parameters:
- :mode: open mode definition (integer)
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :IOError: already opened object, or open error
-
-Description:
- This method opens a large object for reading/writing, in the same way than
- the Unix open() function. The mode value can be obtained by OR-ing the
- constants defined in the pgmodule (INV_READ, INV_WRITE).
-
-close - closes a large object
------------------------------
-Syntax::
-
- close()
-
-Parameters:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection
- :TypeError: too many parameters
- :IOError: object is not opened, or close error
-
-Description:
- This method closes a previously opened large object, in the same way than
- the Unix close() function.
-
-read, write, tell, seek, unlink - file like large object handling
------------------------------------------------------------------
-Syntax::
-
- read(size)
-
-Parameters:
- :size: maximal size of the buffer to be read
-
-Return type:
- :sized string: the read buffer
-
-Exceptions raised:
- :TypeError: invalid connection, invalid object,
- bad parameter type, or too many parameters
- :ValueError: if `size` is negative
- :IOError: object is not opened, or read error
-
-Description:
- This function allows to read data from a large object, starting at current
- position.
-
-Syntax::
-
- write(string)
-
-Parameters:
- (sized) string - buffer to be written
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection, bad parameter type, or too many parameters
- :IOError: object is not opened, or write error
-
-Description:
- This function allows to write data to a large object, starting at current
- position.
-
-Syntax::
-
- seek(offset, whence)
-
-Parameters:
- :offset: position offset
- :whence: positional parameter
-
-Return type:
- :integer: new position in object
-
-Exceptions raised:
- :TypeError: binvalid connection or invalid object,
- bad parameter type, or too many parameters
- :IOError: object is not opened, or seek error
-
-Description:
- This method allows to move the position cursor in the large object. The
- whence parameter can be obtained by OR-ing the constants defined in the
- `pg` module (`SEEK_SET`, `SEEK_CUR`, `SEEK_END`).
-
-Syntax::
-
- tell()
-
-Parameters:
- None
-
-Return type:
- :integer: current position in large object
-
-Exceptions raised:
- :TypeError: invalid connection or invalid object
- :TypeError: too many parameters
- :IOError: object is not opened, or seek error
-
-Description:
- This method allows to get the current position in the large object.
-
-Syntax::
-
- unlink()
-
-Parameter:
- None
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection or invalid object
- :TypeError: too many parameters
- :IOError: object is not closed, or unlink error
-
-Description:
- This methods unlinks (deletes) the PostgreSQL large object.
-
-size - gives the large object size
-----------------------------------
-
-Syntax::
-
- size()
-
-Parameters:
- None
-
-Return type:
- :integer: the large object size
-
-Exceptions raised:
- :TypeError: invalid connection or invalid object
- :TypeError: too many parameters
- :IOError: object is not opened, or seek/tell error
-
-Description:
- This (composite) method allows to get the size of a large object. It was
- implemented because this function is very useful for a web interfaced
- database. Currently, the large object needs to be opened first.
-
-export - saves a large object to a file
----------------------------------------
-Syntax::
-
- export(name)
-
-Parameters:
- :name: file to be created
-
-Return type:
- None
-
-Exceptions raised:
- :TypeError: invalid connection or invalid object,
- bad parameter type, or too many parameters
- :IOError: object is not closed, or export error
-
-Description:
- This methods allows to dump the content of a large object in a very simple
- way. The exported file is created on the host of the program, not the
- server host.
-
-Object attributes
------------------
-`pglarge` objects define a read-only set of attributes that allow to get
-some information about it. These attributes are:
-
- :oid: the OID associated with the object
- :pgcnx: the `pgobject` associated with the object
- :error: the last warning/error message of the connection
-
-.. caution:: *Be careful*:
- In multithreaded environments, `error` may be modified by another thread
- using the same pgobject. Remember these object are shared, not duplicated.
- You should provide some locking to be able if you want to check this.
- The `oid` attribute is very interesting because it allow you reuse the OID
- later, creating the `pglarge` object with a `pgobject` getlo() method call.
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.html
deleted file mode 100644
index 84962f44684..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-PyGreSQL Programming Information
-
-
-
-
-
-
DB-API 2.0
-(Python Database API Specification v2.0)
-is a specification for connecting to databases (not only PostGreSQL)
-from Python that has been developed by the Python DB-SIG in 1999.
-
The following documentation covers only the newer pgdb API.
-
-
The authoritative programming information for the DB-API is availabe at
This section of the documentation still needs to be written.
-
-
-
-
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.txt b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.txt
deleted file mode 100644
index b333c01640d..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/pgdb.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-================================
-PyGreSQL Programming Information
-================================
-
---------------------------------------------
-The DB-API compliant interface (pgdb module)
---------------------------------------------
-
-.. meta::
- :description: The DB-API compliant interface (pgdb module)
- :keywords: PyGreSQL, pgdb, DB-API, PostGreSQL, Python
-
-.. sectnum::
-.. contents:: Contents
-
-
-Introduction
-============
-You may either choose to use the
-`"classic" PyGreSQL interface `_
-provided by the `pg` module or else the
-`DB-API 2.0 compliant interface `_
-provided by the `pgdb` module.
-
-`DB-API 2.0 `_
-(Python Database API Specification v2.0)
-is a specification for connecting to databases (not only PostGreSQL)
-from Python that has been developed by the Python DB-SIG in 1999.
-
-The following documentation covers only the newer `pgdb` API.
-
-The authoritative programming information for the DB-API is availabe at
- http://www.python.org/dev/peps/pep-0249/
-
-A tutorial-like introduction to the DB-API can be found at
- http://www2.linuxjournal.com/lj-issues/issue49/2605.html
-
-
-The pgdb module
-===============
-.. note:: This section of the documentation still needs to be written.
-
diff --git a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/readme.html b/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/readme.html
deleted file mode 100644
index 656f8cd7d4c..00000000000
--- a/gpMgmt/bin/pythonSrc/PyGreSQL-4.0/docs/readme.html
+++ /dev/null
@@ -1,243 +0,0 @@
-
-
-
-
-
-
-PyGreSQL - Python interface for PostgreSQL
-
-
-
-
-
-
Further modifications copyright (c) 1997-2008 by D'Arcy J.M. Cain
-(darcy@druid.net)
-
Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose, without fee, and without a written agreement
-is hereby granted, provided that the above copyright notice and this
-paragraph and the following two paragraphs appear in all copies or in any
-new file that contains a substantial portion of this file.
-
IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
-SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
-ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE
-AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE
-AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
-ENHANCEMENTS, OR MODIFICATIONS.
PostgreSQL is a highly scalable, SQL compliant, open source
-object-relational database management system. With more than 15 years
-of development history, it is quickly becoming the de facto database
-for enterprise level open source solutions.
-Best of all, PostgreSQL's source code is available under the most liberal
-open source license: the BSD license.
-
Python Python is an interpreted, interactive, object-oriented
-programming language. It is often compared to Tcl, Perl, Scheme or Java.
-Python combines remarkable power with very clear syntax. It has modules,
-classes, exceptions, very high level dynamic data types, and dynamic typing.
-There are interfaces to many system calls and libraries, as well as to
-various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules
-are easily written in C or C++. Python is also usable as an extension
-language for applications that need a programmable interface.
-The Python implementation is copyrighted but freely usable and distributable,
-even for commercial use.
-
PyGreSQL is a Python module that interfaces to a PostgreSQL database.
-It embeds the PostgreSQL query library to allow easy use of the powerful
-PostgreSQL features from a Python script.
-
PyGreSQL is developed and tested on a NetBSD system, but it should also
-run on most other platforms where PostgreSQL and Python is running.
-It is based on the PyGres95 code written by Pascal Andre (andre@chimay.via.ecp.fr).
-D'Arcy (darcy@druid.net) renamed it to PyGreSQL starting with
-version 2.0 and serves as the "BDFL" of PyGreSQL.
-
The current version PyGreSQL 4.0 needs PostgreSQL 7.2 and Python 2.3 or above.
Please note that messages to individual developers will generally not be
-answered directly. All questions, comments and code changes must be
-submitted to the mailing list for peer review and archiving.
You may either choose to use the "classic" PyGreSQL interface
-provided by the pg module or else the newer DB-API 2.0
-compliant interface provided by the pgdb module.
-
DB-API 2.0
-(Python Database API Specification v2.0)
-is a specification for connecting to databases (not only PostGreSQL)
-from Python that has been developed by the Python DB-SIG in 1999.
-
The programming information is available in the files
-pg.txt and pgdb.txt.
-
Note that PyGreSQL is not thread-safe on the connection level. Therefore
-we recommend using DBUtils <http://www.webwareforpython.org/DBUtils>
-for multi-threaded environments, which supports both PyGreSQL interfaces.