diff options
author | Bruce Momjian <bruce@momjian.us> | 2000-11-10 22:29:21 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2000-11-10 22:29:21 +0000 |
commit | eafb63643538000b3523478c3b2e51bd4611abbe (patch) | |
tree | 113fe0b7f8d35c474bd9d1a1a14a93ee7fbaee38 /src/interfaces/python/pgdb.py | |
parent | 960c18618486bf1815003d3ebe766f50a5fb2c55 (diff) | |
download | postgresql-eafb63643538000b3523478c3b2e51bd4611abbe.tar.gz postgresql-eafb63643538000b3523478c3b2e51bd4611abbe.zip |
Update to PyGreSQL 3.1:
Fix some quoting functions. In particular handle NULLs better.
Use a method to add primary key information rather than direct
manipulation of the class structures.
Break decimal out in _quote (in pg.py) and treat it as float.
Treat timestamp like date for quoting purposes.
Remove a redundant SELECT from the get method speeding it, and
insert since it calls get, up a little.
Add test for BOOL type in typecast method to pgdbTypeCache class.
(tv@beamnet.de)
Fix pgdb.py to send port as integer to lower level function
(dildog@l0pht.com)
Change pg.py to speed up some operations
Allow updates on tables with no primary keys.
D'Arcy J.M. Cain
Diffstat (limited to 'src/interfaces/python/pgdb.py')
-rw-r--r-- | src/interfaces/python/pgdb.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/python/pgdb.py b/src/interfaces/python/pgdb.py index f5859713f03..28eab3d4ada 100644 --- a/src/interfaces/python/pgdb.py +++ b/src/interfaces/python/pgdb.py @@ -120,6 +120,8 @@ class pgdbTypeCache: pass elif typ == BINARY: pass + elif typ == BOOL: + value = (value[:1] in ['t','T']) elif typ == INTEGER: value = int(value) elif typ == LONG: @@ -322,7 +324,7 @@ def connect(dsn = None, user = None, password = None, host = None, database = No try: params = string.split(host, ":") dbhost = params[0] - dbport = params[1] + dbport = int(params[1]) except: pass |