python - lo: Refactor the version parser.

From: jwp(at)pgfoundry(dot)org (James William Pye)
To: pgsql-committers(at)postgresql(dot)org
Subject: python - lo: Refactor the version parser.
Date: 2007-12-05 00:06:37
Message-ID: 20071205000637.D7BE617AC8A0@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Refactor the version parser.

Relocate the parsing code into split() and make it so that split returns None in
cases where the piece of information is absent. This later proves useful for
general comparisons: "8" is "8.1" or "8.2" or "8.3". (pg_tin uses this for
version selectivity; pg_tin -V 8 com psql -c 'SELECT version()' # select 8.x)
(need to add less than and greater than methods still)

Modified Files:
--------------
lo/postgresql/utility:
version.py (r1.2 -> r1.3)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/lo/postgresql/utility/version.py.diff?r1=1.2&r2=1.3)

Browse pgsql-committers by date

  From Date Subject
Next Message User H-saito 2007-12-05 02:33:27 npgsql - Npgsql2: update the japanese resources.
Previous Message James William Pye 2007-12-05 00:01:38 python - fe: Set of changes.