Update of /usr/cvs/Public/pygresql/docs
In directory druid.net:/tmp/cvs-serv14172/docs

Modified Files:
        changelog.txt future.txt pg.txt 
Log Message:
Support for composite primary keys, code clean-up in get(), insert(), update(), 
clear() and delete() methods.
To see the diffs for this commit:
   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/changelog.txt.diff?r1=1.37&r2=1.38

Index: changelog.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/changelog.txt,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- changelog.txt       4 Dec 2008 21:11:54 -0000       1.37
+++ changelog.txt       5 Dec 2008 02:05:28 -0000       1.38
@@ -36,8 +36,12 @@
 - Added "return_changes" flag to insert method.
 - 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.
 
 Version 3.8.1 (2006-06-05)
 --------------------------

   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/future.txt.diff?r1=1.25&r2=1.26

Index: future.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/future.txt,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- future.txt  2 Dec 2008 22:39:56 -0000       1.25
+++ future.txt  5 Dec 2008 02:05:28 -0000       1.26
@@ -10,9 +10,9 @@
   (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).
+- Before getting the values back after insert() and update(), check
+  with has_table_privilege(table, 'select') whether this is possible.
+  Otherwise we might break an ongoing transaction.
 - 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,

   
http://www.druid.net/pygresql/viewcvs.cgi/cvs/pygresql/docs/pg.txt.diff?r1=1.21&r2=1.22

Index: pg.txt
===================================================================
RCS file: /usr/cvs/Public/pygresql/docs/pg.txt,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- pg.txt      3 Dec 2008 00:17:14 -0000       1.21
+++ pg.txt      5 Dec 2008 02:05:28 -0000       1.22
@@ -776,8 +776,9 @@
   :string: Name of the field which is the primary key of the table
 
 Description:
-  This method returns the primary key of a table. Note that this raises
-  an exception if the table does not have a primary key.
+  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
 ---------------------------------------------------
@@ -860,10 +861,11 @@
 
 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
+  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)`.

_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to