[PyGreSQL] Composite primary keys - again
Christoph Zwerschke
cito at online.de
Wed May 24 06:05:45 EDT 2006
Paul Hide wrote:
> I am experimenting with pygresql as an alternative to pyPgSQL. So far,
> it has been a good experience. However, I was surprised to see that
> pg.pkey only returns one attribute/column name of a table that has a
> composite primary key.
I think PyGreSQL never supported composite primary keys in pkey() and
get(). A backward compatible fix would be to let pkey() return the name
of the primary key if it is a single column, or a tuple of column names
if it is a composite key. get() should cope with composite keys as well,
and also allow tuples for the keyname attribute.
If nobody disagrees, I'll try to add this over the weekend. This could
then go into PyGreSQL 3.9.
-- Christoph
More information about the PyGreSQL
mailing list