From 3cd9399d86faef43c64724e63a138f6b6b7bb814 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 18 Apr 2002 03:37:13 +0000 Subject: [PATCH] Change docs to do 20! rather than larger. --- doc/src/sgml/typeconv.sgml | 6 +++--- src/interfaces/python/pgdb.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/typeconv.sgml b/doc/src/sgml/typeconv.sgml index 031be06a2e..b53dbe4e75 100644 --- a/doc/src/sgml/typeconv.sgml +++ b/doc/src/sgml/typeconv.sgml @@ -435,7 +435,7 @@ On the other hand, the postfix operator ! (factorial) is defined only for integer data types, not for float8. So, if we try a similar case with !, we get: -tgl=> select text '44' ! as "factorial"; +tgl=> select text '20' ! as "factorial"; ERROR: Unable to identify a postfix operator '!' for type 'text' You may need to add parentheses or an explicit cast @@ -443,10 +443,10 @@ This happens because the system can't decide which of the several possible ! operators should be preferred. We can help it out with an explicit cast: -tgl=> select cast(text '44' as int8) ! as "factorial"; +tgl=> select cast(text '20' as int8) ! as "factorial"; factorial --------------------- - 2673996885588443136 + 2432902008176640000 (1 row) diff --git a/src/interfaces/python/pgdb.py b/src/interfaces/python/pgdb.py index 2772809b4e..0edad8a7bb 100644 --- a/src/interfaces/python/pgdb.py +++ b/src/interfaces/python/pgdb.py @@ -337,7 +337,7 @@ class pgdbCnx: ### module interface # connects to a database -def connect(dsn = None, user = None, password = None, host = None, database = None): +def connect(dsn = None, user = None, password = None, xhost = None, database = None): # first get params from DSN dbport = -1 dbhost = "" @@ -364,9 +364,9 @@ def connect(dsn = None, user = None, password = None, host = None, database = No dbpasswd = password if database != None: dbbase = database - if host != None: + if xhost != None: try: - params = string.split(host, ":") + params = string.split(xhost, ":") dbhost = params[0] dbport = int(params[1]) except: -- 2.11.0