You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(18) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(11) |
Feb
(7) |
Mar
(7) |
Apr
(7) |
May
(17) |
Jun
(33) |
Jul
(19) |
Aug
(3) |
Sep
(19) |
Oct
(18) |
Nov
(27) |
Dec
(13) |
2003 |
Jan
(12) |
Feb
(8) |
Mar
(11) |
Apr
(42) |
May
(19) |
Jun
(49) |
Jul
(23) |
Aug
(12) |
Sep
(2) |
Oct
(8) |
Nov
(8) |
Dec
(13) |
2004 |
Jan
(13) |
Feb
(2) |
Mar
(7) |
Apr
(7) |
May
(6) |
Jun
(13) |
Jul
(4) |
Aug
(12) |
Sep
(6) |
Oct
(6) |
Nov
(50) |
Dec
(10) |
2005 |
Jan
(20) |
Feb
(20) |
Mar
(2) |
Apr
(10) |
May
(12) |
Jun
(7) |
Jul
|
Aug
(4) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(2) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(3) |
Jun
(17) |
Jul
(2) |
Aug
(8) |
Sep
(1) |
Oct
(5) |
Nov
(3) |
Dec
(2) |
2007 |
Jan
(2) |
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2009 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Billy G. A. <bil...@mu...> - 2004-07-29 04:47:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 William Robinson wrote: | Hi. | | In the readme, the PgBoolean constants are documented as being PgTrue | and PgFalse. However, in libpq, they appear to be PG_True and PG_False. | I'm using the latter, because it works. Is it just that the | documentation is wrong? | | regards. | bill. The documentation is incorrect. The constants are PG_True and PG_False. - -- ____ | Billy G. Allie | Domain....: Bil...@mu... | /| | 7436 Hartwell | MSN.......: B_G...@em... |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBCIFNnmIkMXoVVdURAjIQAJ9vyYZZ4ec//CgCJ5Gnf1b0QkPhoACgtQLK Kr30e3Kf/nYRd0TzmFNT/28= =WIY4 -----END PGP SIGNATURE----- |
From: Billy G. A. <bil...@mu...> - 2004-07-29 04:38:24
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jorge Godoy wrote: | Hi! | | | I'm trying to debug some code that involves dates and when I print the | SQL statement to be executed, I don't think that all the substitutions | and quotes are being correctly done. I'd like to find a way to print | what is being executed at the 'cursor.execute()' command. Is there any | way to do that? | | Some modules provide a way to print the statement, but I couldn't find | this at pyPgSQL or its documentation. | | | TIA, Once you've opened a connection, you can toggle the printing of the exact query sent to the database as follows: |>> from pyPgSQL import PgSQL |>> cx = PgSQL.connect() |>> cx.conn.toggleShowQuery <-- this toggles printing the query on 'on' |>> cu = cx.cursor() QUERY: BEGIN WORK |>> cu.execute('select * from test where b = %s', 'bga') QUERY: DECLARE "PgSQL_-40B25954" CURSOR FOR select * from test where b = 'bga' QUERY: FETCH 1 FROM "PgSQL_-40B25954" QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 23 QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 1043 Accessing cx.conn.toggleShowQuery again will turn off the printing of the queries. - -- ____ | Billy G. Allie | Domain....: Bil...@mu... | /| | 7436 Hartwell | MSN.......: B_G...@em... |-/-|----- | Dearborn, MI 48126| |/ |LLIE | (313) 582-1540 | -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBCH88nmIkMXoVVdURAoerAKCbtt5nU6uQI6Ec6UTtMpFZvvtRWgCfUYU+ jcK5ev6ZHzxM6W5vWdeC/gs= =dlye -----END PGP SIGNATURE----- |
From: Jorge G. <go...@ie...> - 2004-07-26 21:05:23
|
Hi! I'm trying to debug some code that involves dates and when I print the SQL statement to be executed, I don't think that all the substitutions and quotes are being correctly done. I'd like to find a way to print what is being executed at the 'cursor.execute()' command. Is there any way to do that? Some modules provide a way to print the statement, but I couldn't find this at pyPgSQL or its documentation. TIA, -- Godoy. <go...@ie...> |
From: William R. <bi...@ho...> - 2004-07-07 09:55:43
|
Hi. In the readme, the PgBoolean constants are documented as being PgTrue and PgFalse. However, in libpq, they appear to be PG_True and PG_False. I'm using the latter, because it works. Is it just that the documentation is wrong? regards. bill. |
From: <gh...@gh...> - 2004-06-17 15:37:08
|
Leo Leo wrote: > Hello! > > I have still a question about this parameter "fetchReturnsList". > > As far as I have understood it, the pgResultSet contains a lot more > information about the retrieved data, than the result by Lists. That's correct. PgResultSet had a lot more overhead in the past, but we implemented an optimization once that dynamically creates classes. Now the classes contain the additional information of the PgResultSet, not each object instance any more. PgResultSets are still slower than fetchReturnsList=True, but not so significantly any longer. > [...] So, shouldn't it be better (Performance, less traffic etc.) to gather this > additional information in an other way (just once per select) and get the > data by lists? (I made something like this for PHP some months ago) There's hardly any space overhead of PgResultSets any more :-) -- Gerhard |
From: Leo L. <le...@gm...> - 2004-06-17 14:47:09
|
Hello! I have still a question about this parameter "fetchReturnsList". As far as I have understood it, the pgResultSet contains a lot more information about the retrieved data, than the result by Lists. But: Isn't this additional information equal for ALL selected rows?. If I have for example 1.000 selected rows, I will have 1.000 times the additional info for EACH column and EACH Row, but I would need this information only once per SELECT (except UNION-Statements). So, shouldn't it be better (Performance, less traffic etc.) to gather this additional information in an other way (just once per select) and get the data by lists? (I made something like this for PHP some months ago) What is your opinion about that? Thanks Leo -- +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++ GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl |
From: Leo L. <le...@gm...> - 2004-06-16 16:17:27
|
Hello Adam! > It behaves correctly, because fetchall() retuns a list of PgResult > objects. You'd better try something like this: > > self.__kCurs.execute(sStatement) > kRes = self.__kCurs.fetchall() > for x in kRes: > print type(x) > > If you want to get single PgResult object, use fetchone() instead. Of course, maybe it was too obvious.. thanks a lot.. Leo -- "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen! Jetzt aktivieren unter http://www.gmx.net/info |
From: Leo L. <le...@gm...> - 2004-06-16 13:10:05
|
Hello Karsten! > Are you sure ? I mean, pgResultSet.__str__ or __repr__ > may simply show it as a list of lists. Did you check > type(the_result) ? When my Code is like this: self.__kCurs.execute(sStatement) kRes = self.__kCurs.fetchall() print type(kRes) it will print "<type 'list'>", so I am pretty sure, that it is a list. I even set PgSQL.fetchReturnsList = 0 in my Constructor. I am stuck... -- +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++ GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl |
From: Karsten H. <Kar...@gm...> - 2004-06-16 13:00:17
|
> The Statement itself returns more than one line > > Now the Problem is, that the fetchall()-Method returns a list > [[...],[...],...] and not a pgResultSet as mentioned in the documentation. Are you sure ? I mean, pgResultSet.__str__ or __repr__ may simply show it as a list of lists. Did you check type(the_result) ? Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Leo L. <le...@gm...> - 2004-06-16 12:25:13
|
Hello! I just tried to make a few SQL-statements: Environment: Win XP SP1, PostgreSQL 7.4.1 (via Cygwin), Python 2.3.3 and PyPgSQL 2.4 Here is the code I use (it's inside a classe, therfore the "self's"): from pyPgSQL import PgSQL [...] self.__kConn = PgSQL.connect(<DSN-String>) self.__kCurs = self.__kConn.cursor() self.__kCurs.execute(<Statement>) return self.__kCurs.fetchall() The Statement itself returns more than one line Now the Problem is, that the fetchall()-Method returns a list [[...],[...],...] and not a pgResultSet as mentioned in the documentation. PgSQL.fetchReturnsList ist set to 0. Does anybody know, what might be wrong? Thank you, Leo -- +++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++ GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl |
From: Karsten H. <Kar...@gm...> - 2004-06-15 13:20:30
|
> ''' libpq.OperationalError : ERROR: set-valued function called in > context that cannot accept a set > CONTEXT: PL/pgSQL function "dialup_checkjobtask" line 15 at return next You need to ask on the pgsql-sql mailing list. To be more specific, you need to get your pgSQL code straightened out first. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: rrk <rr...@pr...> - 2004-06-15 12:31:44
|
is it possible to use a result set(record) returned by a function if so what is the syntax i get the following error ''' libpq.OperationalError : ERROR: set-valued function called in context that cannot accept a set CONTEXT: PL/pgSQL function "dialup_checkjobtask" line 15 at return next from this function CREATE OR REPLACE FUNCTION public.dialup_checkjobtask(varchar, int4) RETURNS SETOF tmpdialuptj AS ' declare answer integer; res record; BEGIN select * from tmpDIALUPTJ into res; res.job_id = 0; res.task_id = 0; select count(*) from jobs where jobnumber = $1 and isdeleted = 0 into answer; if (answer > 0) then select job_id from jobs where jobnumber = $1 and isdeleted = 0 into res.job_id; else res.job_id = 0; end if; select count(*) from tasks where number = $2 and isdeleted = 0 into answer; if (answer > 0) then select task_id from tasks where number = $2 and isdeleted = 0 into res.task_id; else res.task_id =0; end if; RETURN NEXT res; RETURN; END; ' LANGUAGE 'plpgsql' VOLATILE; |
From: Karsten H. <Kar...@gm...> - 2004-06-07 14:20:33
|
> ~ install the mx-DateTime-Modul in your python: > > http://www.egenix.com/files/python/egenix-mx-base-2.0.5.tar.gz That is what my first thought was, too. But the he says that the Python function works fine the first time and only fails the second time it is called ! Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Michael R S. <mse...@be...> - 2004-06-07 13:53:55
|
Gerhard, Thanks for your reply. It, mxDateTime, is installed. As I stated everything works the first time I call testQuery.=20 The problem occurs on the second call to testQuery. Mike -----Original Message----- From: pyp...@li... [mailto:pyp...@li...] On Behalf Of Gerhard Quell Sent: Monday, June 07, 2004 9:38 AM To: pyp...@li... Subject: Re: [Pypgsql-users] C-program->Python->mxDateTime Problem -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mike, ~ install the mx-DateTime-Modul in your python: http://www.egenix.com/files/python/egenix-mx-base-2.0.5.tar.gz Greetings Gerhard - -------------- Michael R Seefelt wrote: | | I have written a simple C-program that loads a Python Function that=20 | connects to a PostgreSQL database. When I only load and execute the=20 | Python function all works OK. If I call the Python function a second=20 | time I get the following: Called PyObject_CallObject Traceback (most=20 | recent call last): | File=20 | "/home/mike/src/arthur/query_server/query_analyzer/Query_Analyzer.py", | line 25, in processQuery | from pyPgSQL import PgSQL | File "/usr/local/lib/python2.3/site-packages/pyPgSQL/PgSQL.py", line | 388, in ? | raise ImportError, \ | ImportError: You need to install mxDateTime | (http://www.egenix.com/files/python/eGenix-mx-Extensions.html) | | Any ideas? | | Thanks, Mike | | Here is the code: (hope it helps) If I call testQuery 1 time and exit=20 | all works, call it a second time and the above error occurs | - -- - ------------------------------------------------------ skequell ------ ~ Gerhard Quell Software & Knowledge Engineering ~ Sch=FCtzenweg 3 eMail: gq...@sk... Fon: 0731-26400651 ~ 89275 Elchingen web : http://www.skequell.de Fax: 0731-26400652 - --------------- pgp: 473EC53C - http://www.keyserver.net/en--------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAxG+vvHbZD0c+xTwRAnOvAJ972V8nI2/jeL6Bvemt7CDf0UiwMQCeOHgN 5I+oraW0hNnGSuBc+xZdarY=3D =3DdnX2 -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Pypgsql-users mailing list Pyp...@li... https://lists.sourceforge.net/lists/listinfo/pypgsql-users |
From: Gerhard Q. <gq...@sk...> - 2004-06-07 13:39:46
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Mike, ~ install the mx-DateTime-Modul in your python: http://www.egenix.com/files/python/egenix-mx-base-2.0.5.tar.gz Greetings Gerhard - -------------- Michael R Seefelt wrote: | | I have written a simple C-program that loads a Python Function that | connects to a PostgreSQL database. When I only load and execute the | Python function all works OK. If I call the Python function a second | time I get the following: Called PyObject_CallObject Traceback (most | recent call last): | File | "/home/mike/src/arthur/query_server/query_analyzer/Query_Analyzer.py", | line 25, in processQuery | from pyPgSQL import PgSQL | File "/usr/local/lib/python2.3/site-packages/pyPgSQL/PgSQL.py", line | 388, in ? | raise ImportError, \ | ImportError: You need to install mxDateTime | (http://www.egenix.com/files/python/eGenix-mx-Extensions.html) | | Any ideas? | | Thanks, Mike | | Here is the code: (hope it helps) If I call testQuery 1 time and exit | all works, call it a second time and the above error occurs | - -- - ------------------------------------------------------ skequell ------ ~ Gerhard Quell Software & Knowledge Engineering ~ Schützenweg 3 eMail: gq...@sk... Fon: 0731-26400651 ~ 89275 Elchingen web : http://www.skequell.de Fax: 0731-26400652 - --------------- pgp: 473EC53C - http://www.keyserver.net/en--------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAxG+vvHbZD0c+xTwRAnOvAJ972V8nI2/jeL6Bvemt7CDf0UiwMQCeOHgN 5I+oraW0hNnGSuBc+xZdarY= =dnX2 -----END PGP SIGNATURE----- |
From: Michael R S. <mse...@be...> - 2004-06-07 12:49:58
|
I have written a simple C-program that loads a Python Function that connects to a PostgreSQL database. When I only load and execute the Python function all works OK. If I call the Python function a second time I get the following: Called PyObject_CallObject Traceback (most recent call last): File "/home/mike/src/arthur/query_server/query_analyzer/Query_Analyzer.py", line 25, in processQuery from pyPgSQL import PgSQL File "/usr/local/lib/python2.3/site-packages/pyPgSQL/PgSQL.py", line 388, in ? raise ImportError, \ ImportError: You need to install mxDateTime (http://www.egenix.com/files/python/eGenix-mx-Extensions.html) Any ideas? Thanks, Mike Here is the code: (hope it helps) If I call testQuery 1 time and exit all works, call it a second time and the above error occurs #include <stdlib.h> #include <Python.h> static char theResults[1024]; PyObject *BuildValue(char *query) { PyObject *pDict; printf("BuildValue\n"); pDict = Py_BuildValue("{s[{ss}]sssssssss[{ssss}]}", "from","tablename","a", "full_sql","select a.id from a", "command","select","from_sql","from a","select_sql","select a.id", "select","columnname","id","tablename","a"); return pDict; } char *testQuery(char *user, char *query) { char *results = "Select \'Error processing sql\'"; PyObject *pName, *pModule, *pDict, *pFunc; PyObject *pArgs, *pValue, *pResults; PyObject *pQuery; char *LoadModule = "Query_Analyzer"; char *LoadFunction = "processQuery"; pDict = NULL; printf("testQuery enter\n"); Py_Initialize(); pName = PyString_FromString(LoadModule); /* Error checking of pName left out */ pModule = PyImport_Import(pName); Py_DECREF(pName); if (pModule != NULL) { pDict = PyModule_GetDict(pModule); /* pDict is a borrowed reference */ pFunc = PyDict_GetItemString(pDict, LoadFunction); /* pFun: Borrowed reference */ if (pFunc && PyCallable_Check(pFunc)) { pArgs = PyTuple_New( 2); // two parms user/query // Set user parm pValue = PyString_FromString(user); PyTuple_SetItem(pArgs, 0, pValue); // Build the QUERY Dictionary //pDict = Ablddict(parsetree_list, query); // pQuery = PyString_FromString("our_query"); pQuery = BuildValue(query); printf("Calling PyTuple_SetItem(pArgs, 1, pQuery);\n"); PyTuple_SetItem(pArgs, 1, pQuery); printf("Called PyTuple_SetItem(pArgs, 1, pQuery);\n"); // Call the Python module // elog(LOG,"Calling PyObject_CallObject"); printf("Calling PyObject_CallObject\n"); pResults = PyObject_CallObject(pFunc, pArgs); // pResults = PyString_FromString("select mike from seefelt"); // elog(LOG,"Called PyObject_CallObject"); printf("Called PyObject_CallObject\n"); Py_DECREF(pArgs); Py_DECREF(pFunc); // Py_DECREF(pValue); if (pResults != NULL) { //results = query; if ( PyString_Check(pResults) ) { sprintf(theResults,"%s\n",PyString_AsString(pResults)); results = theResults; } else { printf("Opps not a PyString\n"); } Py_DECREF(pResults); } else { Py_DECREF(pModule); PyErr_Print(); // elog(LOG,"Call failed\n"); return results; } /* pDict and pFunc are borrowed and must not be Py_DECREF-ed */ } else { if (PyErr_Occurred()) PyErr_Print(); // elog(LOG, "Cannot find function \"%s\"\n", LoadFunction); sprintf(theResults, "SELECT 'Cannot find function \"%s\"'", LoadFunction); } Py_DECREF(pModule); } else { PyErr_Print(); // elog(LOG, "Failed to load \"%s\"\n", LoadModule); sprintf(theResults, "Cannot find function \"%s\"\n", LoadModule); return results; } Py_Finalize(); free( pModule ); return results; } /* for testing */ int main(int argc, char *argv[]) { PyObject *pName, *pModule, *pDict, *pFunc; PyObject *pArgs, *pValue; int i,j; i = 1; if ( argc > 1 ) i = atoi(argv[1]); for (j=0;j<i;j++) { printf("\n\n>>>>>>>>>>>>>>>>>>>>>>>>>>> PASS %d\n",j+1); testQuery("MIKE","select a.id from a"); } return 0; } |
From: Richard T. <rt...@in...> - 2004-06-07 02:37:22
|
Hi, New to the list, I joined to try and solve the above problem. Have used pypgsql for a while without previous problems. I'm involved with the gnumed medical records open source project as gui-designer/advisor (www.gnumed.org) Some months ago I switched from my debian box to ARCH linux (brilliant distro - stopped my distro shuffle). However I recently tried to re-install gnumed (python, wxpython based) and installed pyPgSql ok, but when running test I get a segfault. Being only mildly python literate I don't know where to head, and need to get the gnuMed gui running again for testing purposes. Any help would be appreciated. Linux 2.6.3 patched for Win4Lin python-2.3.4-1 wxpython-2.4.2.4-2 Athlon 1.7Gig system I'm really wedded to my ARCH linux box as it is a fabulous disto and I'm loath to swap back to anything else. Thanks in anticipation Dr Richard Terry General Practitioner NSW Australia |
From: Karsten H. <Kar...@gm...> - 2004-05-26 12:20:20
|
Godoy, dates are returned as mx.DateTime.DateTime instances. That package (eGenix mx) provides for quite nice data manipulation. You can look up their docs at their website. One never changes the format a date is *stored* in the database, only the way it is *presented to* the database for storage. I usually send ISO dates to the database and convert to any format I desire from the mx DateTime instances I get back. Note that *interval* support is broken in pyPgSQL if you use age() in your selects. I posted a patch a few weeks back but there seemed to be no interest. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Jorge G. <go...@ie...> - 2004-05-25 21:20:28
|
Hi! How do you usually handle dates? What module(s) do you use for manipulating and showing dates in, e.g., european format? do you change the way date is stored in the database or you store it in ISO format and convert to and from the frontend application? -- Godoy. <go...@ie...> |
From: <gh...@gh...> - 2004-05-24 14:04:30
|
Kirill Lapshin wrote: > Hello, > > I am trying to use pyPgSQL from windows to reach SSL-only postgre > server, and I am getting following error: [...] The pyPgSQL Windows binaries are not compiled against a SSL-aware libpq. The issue is not if Python's socket module supports SSL, but if the PostgreSQL client library libpq is compiled with SSL support. I'll try to keep that in mind next time I produce Windows binaries. In the meantime if you need a workaround, perhaps you can get something to work with a Windows version of stunnel. -- Gerhard |
From: Karsten H. <Kar...@gm...> - 2004-05-17 20:20:20
|
[snip] Is there any interest in patches ? Seems like we need to go elsewhere to look for an actively maintained PG adapter, no ? (Note how I don't even say "developed") Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Kirill L. <ki...@la...> - 2004-05-12 21:40:53
|
Hello, I am trying to use pyPgSQL from windows to reach SSL-only postgre server, and I am getting following error: Traceback (most recent call last): File "test.py", line 3, in ? con = PgSQL.connect(user='***', password='***', host='***', database='***') File "C:\bin\Python23\Lib\site-packages\pyPgSQL\PgSQL.py", line 2211, in connect return Connection(connInfo, client_encoding, unicode_results) File "C:\bin\Python23\Lib\site-packages\pyPgSQL\PgSQL.py", line 2331, in __init__ raise DatabaseError, m libpq.DatabaseError: FATAL: no pg_hba.conf entry for host "***", user "***", database "***", SSL off The very same test works just fine on Linux. If I turn off SSL on server, then I can connect from both Win and Linux. I thought windows version of Python missing SSL, but that's not the case from what I view: C:\work\pgtest>python Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.ssl <function ssl at 0x008F1770> >>> ^Z Any ideas? Thanks. --Kirill |
From: Karsten H. <Kar...@gm...> - 2004-05-12 11:20:32
|
Dear pyPgSQL developers, pyPgSQL assumes that PostgreSQL will not issue "mons" parts in interval output. It does, however, if age() is used in queries. The result of age() is, of course, not safe for post-processing and thus shouldn't really be used. However, pyPgSQL also works around the unsafe practice of returning "years" parts in intervals (yes, they are 365.2425 days in most cases but not always, think leap years). So, to at least make pyPgSQL *work* with intervals including "mons" I fixed interval2DateTimeDelta(). Patch attached. I also added a comment explaining why date-date should be used instead of age() if one intends to post-process the interval. Please consider for inclusion. Regards, Karsten Hilbert, MD GnuMed i18n coordinator -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Karsten H. <Kar...@gm...> - 2004-04-23 08:00:29
|
> > Sounds like you are missing a commit somewhere. > > I never did a BEGIN, so my understanding is that a COMMIT should not be > necessary. Depends on what your pyPgSQL does and what your PostgreSQL version is. pyPgSQL likely opens a transaction for you. PostgreSQL changed the default of auto-commit somewhere around 7.3 or so. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |
From: Rock H. <ro...@ip...> - 2004-04-22 19:16:27
|
> Sounds like you are missing a commit somewhere. Ah. I see that auto-commit is off by default. That must be it. Thanks for the suggestion. Rock |