From: Billy G. A. <bal...@us...> - 2001-11-04 05:34:05
|
Update of /cvsroot/pypgsql/pypgsql In directory usw-pr-cvs1:/tmp/cvs-serv2300 Modified Files: README Log Message: 03NOV2001 bga Re-structured parts of the README file. Updated the file for release 1.7 of pyPgSQL. Index: README =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/README,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** README 2001/10/17 06:38:20 1.17 --- README 2001/11/04 05:34:03 1.18 *************** *** 159,202 **** -------------------- ! This module defines the following five (5) classes: ! ! PgConnection - the connection class. It handles the connection and all ! requests to the database. ! PgResults - handles the query results. ! PgLargeObject - handles the access to PostgreSQL large objects. ! PgNotify - the notify class. It contains information about a notifi- ! cation event sent from a PostgreSQL backend process. ! PgVersion - the version class. It contains information about the ver- ! sion of the PostgreSQL backend that a connection object is ! connected to. ! ! The module makes error information available via the following exception ! objects, in addition to the standard Python exceptions: ! Warning, Error, InterfaceError, DatabaseError, OperationalError, ! IntegrityError, InternalError, ProgrammingError, NotSupportedError ! Additional information about these exceptions can be found in the Python DB-API ! 2.0 documentation. ! The following methods are defined by libpq: ! PQconnectdb - preferred method to connect to a database. ! PQconndefaults - returns a list containing the connection defaults. ! PQresStatus - returns a string representation of the result status. ! PQresType - returns a string representation of the result type. ! PQftypeName - returns a string name for a PostgreSQL type (oid). ! PgBoolean - creates a PgBoolean object from a string or number. ! PgBooleanFromString - Deprecialted, use PgBoolean(). ! PgBooleanFromInteger- Deprecialted, use PgBoolean(). ! PgInt2 - creates a PgInt2 object from a string or number. ! PgInt8 - creates a PgInt8 object from a string or number. ! PgLargeObject - creates a PgLargeObject from a connection and OID. ! PgVersion - creates a PgVerion object from a string. ! PgQuoteString - Quotes a string, escaping any characters as needed, ! for use as input to a character/text field. ! PgQuoteBytea - Escapes a string, which can contain NUL characters, ! so that it can used as an input to a bytea field. ! PgUnQuoteBytea - Reverses the action of PgQuoteBytes(). There are a number of constants defined in libpq. They are intended to be used --- 159,175 ---- -------------------- ! 2.1.1 Importing libpq ! --------------------- ! The module, libpq, is part of the pyPgSQL package. It is imported using ! the following statement: ! from pyPgSQL import libpq ! Note: This has change from previous releases of pyPgSQL where "import libpq" ! was used to import the module. ! 2.1.2 libpq Constants ! ---------------------- There are a number of constants defined in libpq. They are intended to be used *************** *** 263,268 **** PgTrue, PgFalse ! 2.1.1 PQconnectdb ! ----------------- Syntax: c = PQconnectdb(conninfo) --- 236,264 ---- PgTrue, PgFalse ! 2.1.3 libpq Methods ! ------------------- ! ! The following methods are defined by libpq: ! ! PQconnectdb - preferred method to connect to a database. ! PQconndefaults - returns a list containing the connection defaults. ! PQresStatus - returns a string representation of the result status. ! PQresType - returns a string representation of the result type. ! PQftypeName - returns a string name for a PostgreSQL type (oid). ! PgBoolean - creates a PgBoolean object from a string or number. ! PgBooleanFromString - Deprecialted, use PgBoolean(). ! PgBooleanFromInteger- Deprecialted, use PgBoolean(). ! PgInt2 - creates a PgInt2 object from a string or number. ! PgInt8 - creates a PgInt8 object from a string or number. ! PgLargeObject - creates a PgLargeObject from a connection and OID. ! PgVersion - creates a PgVerion object from a string. ! PgQuoteString - Quotes a string, escaping any characters as needed, ! for use as input to a character/text field. ! PgQuoteBytea - Escapes a string, which can contain NUL characters, ! so that it can used as an input to a bytea field. ! PgUnQuoteBytea - Reverses the action of PgQuoteBytes(). ! ! 2.1.3.1 PQconnectdb ! ------------------ Syntax: c = PQconnectdb(conninfo) *************** *** 278,283 **** Note: See the PostgreSQL C API documentation for details. ! 2.1.2 PQconndefaults ! -------------------- Syntax: l = PQconndefaults() --- 274,279 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.3.2 PQconndefaults ! --------------------- Syntax: l = PQconndefaults() *************** *** 291,296 **** Note: See the PostgreSQL C API documentation for details. ! 2.1.3 PQresStatus ! ----------------- Syntax: s = PQresStatus(status) --- 287,292 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.3.3 PQresStatus ! ------------------- Syntax: s = PQresStatus(status) *************** *** 302,307 **** Note: See the PostgreSQL C API documentation for details. ! 2.1.4 PQresType ! --------------- Syntax: s = PQresType(type) --- 298,303 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.3.4 PQresType ! ----------------- Syntax: s = PQresType(type) *************** *** 317,322 **** Returns: A string representation of the result type code, 'type'. ! 2.1.5 PQftypeName ! ----------------- Syntax: s = PQftypeName(type) --- 313,318 ---- Returns: A string representation of the result type code, 'type'. ! 2.1.3.5 PQftypeName ! ------------------- Syntax: s = PQftypeName(type) *************** *** 329,334 **** function. ! 2.1.6 PgBoolean ! --------------- Syntax: b = PgBoolean(object) --- 325,330 ---- function. ! 2.1.3.6 PgBoolean ! ----------------- Syntax: b = PgBoolean(object) *************** *** 344,349 **** Returns: PgTrue or PgFalse based on the value of 'object' ! 2.1.7 PgInt2 ! ------------ Syntax: n = PgInt2(object) --- 340,345 ---- Returns: PgTrue or PgFalse based on the value of 'object' ! 2.1.3.7 PgInt2 ! -------------- Syntax: n = PgInt2(object) *************** *** 355,360 **** Returns: A PgInt2 object initialized with the value of 'object'. ! 2.1.8 PgInt8 ! ------------ Syntax: n = PgInt8(object) --- 351,356 ---- Returns: A PgInt2 object initialized with the value of 'object'. ! 2.1.3.8 PgInt8 ! -------------- Syntax: n = PgInt8(object) *************** *** 366,371 **** Returns: A PgInt8 object initialized with the value of 'object'. ! 2.1.9 PgLargeObject ! ------------------- Syntax: o = PgLargeObject(PgConnection, OID) --- 362,367 ---- Returns: A PgInt8 object initialized with the value of 'object'. ! 2.1.3.9 PgLargeObject ! --------------------- Syntax: o = PgLargeObject(PgConnection, OID) *************** *** 385,390 **** rollback is desired, pass close() an argument of 1. ! 2.1.10 PgQuoteString ! -------------------- Syntax: s = PgQuoteString(string, forArray) --- 381,386 ---- rollback is desired, pass close() an argument of 1. ! 2.1.3.10 PgQuoteString ! ---------------------- Syntax: s = PgQuoteString(string, forArray) *************** *** 414,419 **** Returns: A quoted, escaped copy of the input string. ! 2.1.11 PgQuoteBytea ! ------------------- Syntax: s = PgQuoteBytea(string) --- 410,415 ---- Returns: A quoted, escaped copy of the input string. ! 2.1.3.11 PgQuoteBytea ! --------------------- Syntax: s = PgQuoteBytea(string) *************** *** 439,444 **** Returns: A quoted, escaped copy of the input string. ! 2.1.12 PgUnQuoteBytea ! --------------------- Syntax: s = PgUnQuoteBytea(string) --- 435,440 ---- Returns: A quoted, escaped copy of the input string. ! 2.1.3.12 PgUnQuoteBytea ! ----------------------- Syntax: s = PgUnQuoteBytea(string) *************** *** 449,455 **** to thier original value. ! 2.2 The PgConnection Object ! --------------------------- The PgConnection Object defines a connection to the PostgreSQL database. It has the following public, read-only attributes: --- 445,475 ---- to thier original value. ! 2.1.4 libpq Classes ! ------------------- + This module defines the following five (5) classes: + + PgConnection - the connection class. It handles the connection and all + requests to the database. + PgResults - handles the query results. + PgLargeObject - handles the access to PostgreSQL large objects. + PgNotify - the notify class. It contains information about a notifi- + cation event sent from a PostgreSQL backend process. + PgVersion - the version class. It contains information about the ver- + sion of the PostgreSQL backend that a connection object is + connected to. + + The module makes error information available via the following exception + objects, in addition to the standard Python exceptions: + + Warning, Error, InterfaceError, DatabaseError, OperationalError, + IntegrityError, InternalError, ProgrammingError, NotSupportedError + + Additional information about these exceptions can be found in the Python DB-API + 2.0 documentation. + + 2.1.4.1 The PgConnection Object + ------------------------------- + The PgConnection Object defines a connection to the PostgreSQL database. It has the following public, read-only attributes: *************** *** 518,523 **** untrace - Disable tracing start by the trace method. ! 2.2.1 connectPoll (PostgreSQL 7.x and above) ! ----------------- Syntax: i = c.connectPoll() --- 538,543 ---- untrace - Disable tracing start by the trace method. ! 2.1.4.1.1 connectPoll (PostgreSQL 7.x and above) ! --------------------- Syntax: i = c.connectPoll() *************** *** 534,539 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.2 query ! ----------- Syntax: r = c.query(string) --- 554,559 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.2 query ! --------------- Syntax: r = c.query(string) *************** *** 550,555 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.3 sendQuery ! --------------- Syntax: c.sendQuery(string) --- 570,575 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.3 sendQuery ! ------------------- Syntax: c.sendQuery(string) *************** *** 563,568 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.4 getResult ! --------------- Syntax: r = c.getResult() --- 583,588 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.4 getResult ! ------------------- Syntax: r = c.getResult() *************** *** 579,584 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.5 setnonblocking (PostgreSQL 7.x and above) ! -------------------- Syntax: c.setnonblocking(mode) --- 599,604 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.5 setnonblocking (PostgreSQL 7.x and above) ! ------------------------ Syntax: c.setnonblocking(mode) *************** *** 592,597 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.6 consumeInput ! ------------------ Syntax: c.consumeInput() --- 612,617 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.6 consumeInput ! ---------------------- Syntax: c.consumeInput() *************** *** 605,610 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.7 flush (PostgreSQL 7.x amd above) ! ----------- Syntax: c.flush() --- 625,630 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.7 flush (PostgreSQL 7.x amd above) ! --------------- Syntax: c.flush() *************** *** 618,623 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.8 requestCancel ! ------------------- Syntax: c.requestCancel() --- 638,643 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.8 requestCancel ! ----------------------- Syntax: c.requestCancel() *************** *** 632,637 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.9 finish ! ------------ Syntax: c.finish() --- 652,657 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.9 finish ! ---------------- Syntax: c.finish() *************** *** 649,654 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.10 reset ! ------------ Syntax: c.reset() --- 669,674 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.10 reset ! ---------------- Syntax: c.reset() *************** *** 662,667 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.11 notifies ! --------------- Syntax: n = c.notifies() --- 682,687 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.11 notifies ! ------------------- Syntax: n = c.notifies() *************** *** 680,685 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.12 getline ! -------------- Syntax: s = c.getline() --- 700,705 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.12 getline ! ------------------ Syntax: s = c.getline() *************** *** 696,701 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.13 getlineAsync ! ------------------- Syntax: s = c.getlineAsync() --- 716,721 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.13 getlineAsync ! ----------------------- Syntax: s = c.getlineAsync() *************** *** 713,718 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.14 putline ! -------------- Syntax: c.putline(s) --- 733,738 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.14 putline ! ------------------ Syntax: c.putline(s) *************** *** 728,733 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.15 endcopy ! -------------- Syntax: c.endcopy() --- 748,753 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.15 endcopy ! ------------------ Syntax: c.endcopy() *************** *** 747,752 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.16 lo_creat ! --------------- Syntax: lo = c.lo_creat(mode) --- 767,772 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.16 lo_creat ! ------------------- Syntax: lo = c.lo_creat(mode) *************** *** 761,766 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.18 lo_import ! ---------------- Syntax: lo = c.lo_import(filename) --- 781,786 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.17 lo_import ! -------------------- Syntax: lo = c.lo_import(filename) *************** *** 775,780 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.19 lo_export ! ---------------- Syntax: c.lo_export(oid, filename) --- 795,800 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.18 lo_export ! -------------------- Syntax: c.lo_export(oid, filename) *************** *** 790,795 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.20 lo_unlink ! ---------------- Syntax: c.lo_unlink(oid) --- 810,815 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.19 lo_unlink ! -------------------- Syntax: c.lo_unlink(oid) *************** *** 800,805 **** Exceptions: InterfaceError, IOError, TypeError ! 2.2.21 trace ! ------------ Syntax: c.trace(fileObject) --- 820,825 ---- Exceptions: InterfaceError, IOError, TypeError ! 2.1.4.1.20 trace ! ---------------- Syntax: c.trace(fileObject) *************** *** 813,818 **** Note: See the PostgreSQL C API documentation for details. ! 2.2.22 untrace ! -------------- Syntax: c.untrace() --- 833,838 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.1.21 untrace ! ------------------ Syntax: c.untrace() *************** *** 825,830 **** Note: See the PostgreSQL C API documentation for details. ! 2.3 The PgResult Object ! ----------------------- The PgResult object defines the result of a query. It has the following --- 845,850 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2 The PgResult Object ! --------------------------- The PgResult object defines the result of a query. It has the following *************** *** 867,872 **** clear - Frees the memory used by result. ! 2.3.1 fname ! ----------- Syntax: s = r.fname(fidx) --- 887,892 ---- clear - Frees the memory used by result. ! 2.1.4.2.1 fname ! --------------- Syntax: s = r.fname(fidx) *************** *** 883,888 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.2 fnumber ! ------------- Syntax: i = r.fnumber(name) --- 903,908 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.2 fnumber ! ----------------- Syntax: i = r.fnumber(name) *************** *** 899,904 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.3 ftype ! ----------- Syntax: i = r.ftype(fidx) --- 919,924 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.3 ftype ! --------------- Syntax: i = r.ftype(fidx) *************** *** 914,919 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.4 fsize ! ----------- Syntax: i = r.fsize(fidx) --- 934,939 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.4 fsize ! --------------- Syntax: i = r.fsize(fidx) *************** *** 933,938 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.5 fmod ! ----------- Syntax: i = r.fmod(fidx) --- 953,958 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.5 fmod ! -------------- Syntax: i = r.fmod(fidx) *************** *** 949,954 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.6 getvalue ! -------------- Syntax: o = r.getvalue(tidx, fidx) --- 969,974 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.6 getvalue ! ------------------ Syntax: o = r.getvalue(tidx, fidx) *************** *** 986,991 **** Exceptions: InterfaceError, TypeError ! 2.3.7 getlength ! --------------- Syntax: i = r.getlength(tidx, fidx) --- 1006,1011 ---- Exceptions: InterfaceError, TypeError ! 2.1.4.2.7 getlength ! ------------------- Syntax: i = r.getlength(tidx, fidx) *************** *** 1004,1009 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.8 getisnull ! --------------- Syntax: i = r.getisnull(tidx, fidx) --- 1024,1029 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.8 getisnull ! ------------------- Syntax: i = r.getisnull(tidx, fidx) *************** *** 1022,1027 **** Note: See the PostgreSQL C API documentation for details. ! 2.3.9 clear ! ----------- Syntax: r.clear() --- 1042,1047 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.2.9 clear ! --------------- Syntax: r.clear() *************** *** 1038,1042 **** Note: See the PostgreSQL C API documentation for details. ! 2.4 The PgLargeObject object ---------------------------- --- 1058,1062 ---- Note: See the PostgreSQL C API documentation for details. ! 2.1.4.3 The PgLargeObject object ---------------------------- *************** *** 1076,1081 **** a few differences, which will be detailed here. ! 2.4.1 open ! ---------- Syntax: lo.open(mode) --- 1096,1101 ---- a few differences, which will be detailed here. ! 2.1.4.3.1 open ! -------------- Syntax: lo.open(mode) *************** *** 1098,1103 **** created with the PgLargeObject method of libpq (and PgSQL). ! 2.4.3 close ! ----------- Syntax: lo.close() --- 1118,1123 ---- created with the PgLargeObject method of libpq (and PgSQL). ! 2.1.4.3.2 close ! --------------- Syntax: lo.close() *************** *** 1113,1118 **** created with the PgLargeObject method. ! 2.4.3 export ! ------------ Syntax: i = lo.export(filename) --- 1133,1138 ---- created with the PgLargeObject method. ! 2.1.4.3.3 export ! ---------------- Syntax: i = lo.export(filename) *************** *** 1126,1130 **** the server). ! 2.5 The PgNotify Object ----------------------- --- 1146,1150 ---- the server). ! 2.1.4.4 The PgNotify Object ----------------------- *************** *** 1136,1140 **** cation. ! 2.6 The PgVersion Object ------------------------ --- 1156,1160 ---- cation. ! 2.1.4.5 The PgVersion Object ------------------------ *************** *** 1190,1194 **** Note: Comparisons against strings (i.e. "7.0.1") does not work in Python 2.0. ! 3.0 The PgSQL module -------------------- --- 1210,1214 ---- Note: Comparisons against strings (i.e. "7.0.1") does not work in Python 2.0. ! 2.2 The PgSQL module -------------------- *************** *** 1198,1204 **** describe the differences in the PgSQL here. ! 3.1 Differences at the Module Level ! ----------------------------------- 1. The Binary contructor is a method of the Connection object, not the module. For PostgreSQL, a Large Object can only be created in conjunction with a --- 1218,1235 ---- describe the differences in the PgSQL here. ! 2.2.1 Importing PgSQL ! --------------------- ! ! The module, PgSQL, is part of the pyPgSQL package. It is imported using ! the following statement: ! ! from pyPgSQL import PgSQL ! ! Note: This has change from previous releases of pyPgSQL where "import PgSQL" ! was used to import the module. + 2.2.2 Differences at the Module Level + ------------------------------------- + 1. The Binary contructor is a method of the Connection object, not the module. For PostgreSQL, a Large Object can only be created in conjunction with a *************** *** 1264,1269 **** The default value for fetchReturnsList is 0. ! 3.2 Differences in the Connection Object ! ---------------------------------------- 1. The Connection object has an additional read-only attribute called notices. --- 1295,1300 ---- The default value for fetchReturnsList is 0. ! 2.2.3 Differences in the Connection Object ! ------------------------------------------ 1. The Connection object has an additional read-only attribute called notices. *************** *** 1284,1289 **** Object from the database. ! 3.2.1 unlink ! ------------ Syntax: c.unlink(PgLargeObject) --- 1315,1320 ---- Object from the database. ! 2.2.3.1 unlink ! -------------- Syntax: c.unlink(PgLargeObject) *************** *** 1294,1299 **** Exceptions: InterfaceError, IOError, TypeError ! 3.3 Differences in the Cursor Object ! ------------------------------------ 1. The description attribute is a sequence of 8-item sequences. The first --- 1325,1330 ---- Exceptions: InterfaceError, IOError, TypeError ! 2.2.4 Differences in the Cursor Object ! -------------------------------------- 1. The description attribute is a sequence of 8-item sequences. The first *************** *** 1331,1336 **** way to get the object ID of a newly inserted record. ! 3.4 General Notes and Observations ! ---------------------------------- The PostgreSQL database system has no auto-commit setting. It is always in --- 1362,1367 ---- way to get the object ID of a newly inserted record. ! 3.0 General Notes and Observations ! ================================== The PostgreSQL database system has no auto-commit setting. It is always in |