Update of /usr/cvs/Public/pygresql/docs
In directory druid.net:/tmp/cvs-serv21387/docs
Modified Files:
changelog.txt future.txt pg.txt
Log Message:
Added methods for determining the protocol and server version.
To see the diffs for this commit:
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/changelog.txt.diff?r1=1.34&r2=1.35
Index: changelog.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/changelog.txt,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- changelog.txt 2 Dec 2008 16:50:54 -0000 1.34
+++ changelog.txt 2 Dec 2008 22:39:56 -0000 1.35
@@ -32,8 +32,9 @@
for the same purpose.
- Improved getnotify() by calling PQconsumeInput() instead of
submitting an empty command.
-- Removed compatibility code for old OID munging style
+- Removed compatibility code for old OID munging style.
- Added "return_changes" flag to insert method.
+- Added protocol_version() and server_version() methods.
Version 3.8.1 (2006-06-05)
--------------------------
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/future.txt.diff?r1=1.24&r2=1.25
Index: future.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/future.txt,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- future.txt 25 Nov 2008 18:15:23 -0000 1.24
+++ future.txt 2 Dec 2008 22:39:56 -0000 1.25
@@ -8,6 +8,8 @@
- Classic pg relies on OIDs, but these are not generated by default any more
(at least docs should recommend setting default_with_oids=true).
+- The insert() method in pg should use a `returning *` clause instead of
+ the subsequent get() when the PostgreSQL version is >= 8.2.
- Support composite primary keys and generally reconsider the pkey() method,
(see http://mailman.vex.net/pipermail/pygresql/2006-May/001688.html,
http://mailman.vex.net/pipermail/pygresql/2004-February/001282.html).
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/pg.txt.diff?r1=1.19&r2=1.20
Index: pg.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/pg.txt,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- pg.txt 2 Dec 2008 16:50:54 -0000 1.19
+++ pg.txt 2 Dec 2008 22:39:56 -0000 1.20
@@ -522,6 +522,45 @@
This method returns the underlying socket id used to connect
to the database. This is useful for use in select calls, etc.
+protocol_version - interrogates the frontend/backend protocol being used
+------------------------------------------------------------------------
+Syntax::
+
+ protocol_version()
+
+Parameters:
+ None
+
+Exceptions raised:
+ :TypeError: too many (any) arguments
+
+Description:
+ Applications might wish to use this to determine whether certain
+ features are supported. Currently, the possible values are 2
+ (2.0 protocol), 3 (3.0 protocol), or zero (connection bad).
+ This will not change after connection startup is complete,
+ but it could theoretically change during a connection reset.
+
+server_version - interrogates the frontend/backend protocol being used
+----------------------------------------------------------------------
+Syntax::
+
+ server_version()
+
+Parameters:
+ None
+
+Exceptions raised:
+ :TypeError: too many (any) arguments
+
+Description:
+ Applications might use this to determine the version of the database
+ server they are connected to. The number is formed by converting
+ the major, minor, and revision numbers into two-decimal-digit numbers
+ and appending them together. For example, version 8.1.5 will be returned
+ as 80105, and version 8.2 will be returned as 80200 (leading zeroes are
+ not shown). Zero is returned if the connection is bad.
+
getnotify - gets the last notify from the server
------------------------------------------------
Syntax::
@@ -889,7 +928,7 @@
The dictionary is then reloaded with the values actually inserted
in order to pick up values modified by rules, triggers, etc. If
the optional flag return_changes is set to False this reload will
- be skipped.
+ be skipped.
Due to the way that this function works you will find inserts taking
longer and longer as your table gets bigger. To overcome this problem
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql