[PyGreSQL] Is get_relations() method obsolete?

D'Arcy J.M. Cain darcy at PyGreSQL.org
Thu Dec 7 14:23:35 EST 2006


On Thu, 07 Dec 2006 19:39:34 +0100
Christoph Zwerschke <cito at online.de> wrote:
> Marina Olhovsky schrieb:
> > Is get_relations() function obsolete? I tried using it in a Python 
> > script to retrieve a list of all sequences from a database, and I got an 
> > AttributeError: 
>  >
> > import pg
> > db = pg.DB(my_dbname, my_host, my_port, None, None, my_user, my_passwd)
> > sequences = db.get_relations('S')
> 
> Just tested it with the latest version 3.8.1 and it works. The method 
> was added in version 3.5 or so.

Yep, 3.8 in fact.  Far from being obsolete it is replacing the
get_tables method although that method still exists as a special case
of get_relations() for backwards compatibility.

-- 
D'Arcy J.M. Cain
PyGreSQL Development Group
http://www.PyGreSQL.org


More information about the PyGreSQL mailing list