<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.db.psycopg.devel">
    <title>gmane.comp.python.db.psycopg.devel</title>
    <link>http://blog.gmane.org/gmane.comp.python.db.psycopg.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5728"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5723"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5722"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5721"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5720"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5715"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5714"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5713"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5711"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5707"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5700"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5694"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5678"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5673"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5671"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5670"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5669"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5666"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5662"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5660"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5728">
    <title>transaction commit</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5728</link>
    <description>&lt;pre&gt;We are using the Psycopg2 DA for zope. Is there a way to force auto 
commit on a transaction or does the use of COMMIT in a ZSQL method have 
the desired effect?
Thanks
Garry
&lt;/pre&gt;</description>
    <dc:creator>Garry Saddington</dc:creator>
    <dc:date>2010-09-03T16:10:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5723">
    <title>composite types</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5723</link>
    <description>&lt;pre&gt;Hi!

How can I use composite type array function parameters with psycopg2?

The situation is:

create type mytype as
(
        i integer;
        t character varying;
);

create function myfunc(in param mytype[]) as
.....

How can I call this function form psycopg2?

Thanks in advance:
Imre Horvath
&lt;/pre&gt;</description>
    <dc:creator>Imre Horvath</dc:creator>
    <dc:date>2010-08-29T13:35:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5722">
    <title>composite types</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5722</link>
    <description>&lt;pre&gt;Hi!

How can I use composite type array function parameters with psycopg2?

The situation is:

create type mytype as
(
i integer;
t character varying;
);

create function myfunc(in param mytype[]) as
.....

How can I call this function form psycopg2?

Thanks in advance:
Imre Horvath
&lt;/pre&gt;</description>
    <dc:creator>Horváth Imre</dc:creator>
    <dc:date>2010-08-29T13:09:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5721">
    <title>Notify examples</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5721</link>
    <description>&lt;pre&gt;Hello there,

I was trying to make a basic example of notify/listen and I've found a
big difference in the select() call between the examples directory [1]
and the official docs version [2].

The first one say:

select.select([curs],[],[],5)==([],[],[]):

but the docs say:

select.select([conn],[],[],5) == ([],[],[]):

Notice the difference in waiting input from cursor and from the
connection objects; which one is correct?

I'm using psycopg2 *v2.0* in Ubuntu 10.04, and if I try the docs
version (select([conn]...) it doesn't work:

marcelo&amp;lt; at &amp;gt;marcelo-laptop:~/desarrollo/pg_notify_example$ python notify_docs.py

Waiting for 'NOTIFY test'
Traceback (most recent call last):
  File "notify_docs.py", line 13, in &amp;lt;module&amp;gt;
    if select.select([conn],[],[],5) == ([],[],[]):
TypeError: argument must be an int, or have a fileno() method.

At first I tought there was a change in the psycopg2 *v2.2* version
(which will be available in Ubuntu 10.10), but the trunk/examples
version [1] (select([curs]...) does work perfectly&lt;/pre&gt;</description>
    <dc:creator>Marcelo Fernandez</dc:creator>
    <dc:date>2010-08-28T16:31:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5720">
    <title>booleans</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5720</link>
    <description>&lt;pre&gt;Psycopg2 when used in Zope via the zope adapter seems to return booleans 
as True or False. Is there any way to make it return 1 or 0 as psycopg1 did?
Garry
&lt;/pre&gt;</description>
    <dc:creator>Garry Saddington</dc:creator>
    <dc:date>2010-08-28T13:52:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5715">
    <title>NOTIFY payload patch</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5715</link>
    <description>&lt;pre&gt;Here is a trivial patch to add support for NOTIFY payloads in 9.0b4:

(tg2env)[15:33:32][agentm&amp;lt; at &amp;gt;RD07:~/Dev/psycopg2]&amp;gt; git diff
diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c
index 902fdbb..7177e75 100644
--- a/psycopg/connection_int.c
+++ b/psycopg/connection_int.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -141,9 +141,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; conn_notifies_process(connectionObject *self)
         Dprintf("conn_notifies_process: got NOTIFY from pid %d, msg = %s",
                 (int) pgn-&amp;gt;be_pid, pgn-&amp;gt;relname);
 
-        notify = PyTuple_New(2);
+        notify = PyTuple_New(3);
         PyTuple_SET_ITEM(notify, 0, PyInt_FromLong((long)pgn-&amp;gt;be_pid));
         PyTuple_SET_ITEM(notify, 1, PyString_FromString(pgn-&amp;gt;relname));
+       PyTuple_SET_ITEM(notify, 2, PyString_FromString(pgn-&amp;gt;extra));
         PyList_Append(self-&amp;gt;notifies, notify);
         Py_DECREF(notify);
         PQfreemem(pgn);

Note that this will break code which unpacks the tuple in an assignment:

(pid,name)  = dbconn.notifies.pop()

must become

(pid,name,payload) = dbconn.notif&lt;/pre&gt;</description>
    <dc:creator>A.M.</dc:creator>
    <dc:date>2010-08-25T19:39:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5714">
    <title>official git repo really old</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5714</link>
    <description>&lt;pre&gt;Hi,

It looks like the git repo at git://luna.dndg.it/public/psycopg2.git linked from the psycopg2 homepage hasn't been updated since May, 2009. By googling, I found git://wulczer.org/psycopg2.git . Is this now the "official" psycopg2 repo?

Cheers,
M
&lt;/pre&gt;</description>
    <dc:creator>A.M.</dc:creator>
    <dc:date>2010-08-25T18:26:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5713">
    <title>green polling to wait for notify</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5713</link>
    <description>&lt;pre&gt;Hello,

I am using the great new coroutine feature to integrate eventlet with psycopg2. I wrote the following code to run a greenlet thread which merely waits for a NOTIFY event.

def postgresql_listen(connect_string):
    dbconn = psycopg2.connect(connect_string)
    #issue listen for events                                                                                                 
    dbconn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)
    dbcursor = dbconn.cursor()
    dbcursor.execute('LISTEN test;');
    dbcursor.close()
    while True:
        print 'poll in'
        state = dbconn.poll()
        print 'poll out'
        if state == psycopg2.extensions.POLL_OK:
            while dbconn.notifies:
                notification = dbconn.notifies.pop()
                print notification
            select.select([dbconn.fileno()], [], []) #delete this line to cause infinite loop- I had to add this line to prevent it
        elif state == psycopg2.extensions.POLL_READ:
           &lt;/pre&gt;</description>
    <dc:creator>A.M.</dc:creator>
    <dc:date>2010-08-23T19:44:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5711">
    <title>commit problems</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5711</link>
    <description>&lt;pre&gt;We have had a problem with postgresql 8.3 on a Windows server 2008. I 
wonder whether there has been any other experiences like this. We have 
connected to Potsgres from Zope via a Psycopg adapter and noticed that 
sometimes when data is inserted via a form in Zope, the data is 
available in Zope but doesn't get committed to the database. This has 
come to a head over the weekend where at least one month's worth of data 
has disappeared and this includes changes to the actual database 
structure - luckily only on a testing machine, but concerning nevertheless.
The data seemed to disappear after we upgraded to the most recent 
version of Zpsycopg2 database adapter, previously we were using version 
1 (I know it's old, we are only testing after all) and have never had 
these sorts of problem before. It's almost as if all the data and 
changes to the db were held in memory, and Postgres continued to work 
fine from there, but when the db adapter was changed and Zope restarted 
everything was cleared from memory&lt;/pre&gt;</description>
    <dc:creator>Richard Harley</dc:creator>
    <dc:date>2010-08-23T14:55:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5707">
    <title>fetchall() never returns</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5707</link>
    <description>&lt;pre&gt;Hi

I have a problem with what appears to be fetchall() never returning or
not timing out.

I am fetching a set of results from a db continuously, that is get the
results, process, wait and then get the results again.

The problem is that randomly the fetch loop seems to just stop.  No
errors, nothing at all. Some times it will run for a day or more,
other times it will stop after a couple of minutes.   The database is
on the other side of the world, so there is a large round trip (600ms
or more), so I was wondering if that was the cause.

Attached is a simple test I have been using.  I set the time out on
the server to 1 second, is there any way to set the time out on the
client?  Or is there something else happening here.   Once or twice I
have had  an InternalError exception thrown, but 99% of the time it
just seems to freeze.


thanks.


from __future__ import print_function

import psycopg2 as postgres
import psycopg2.extensions
import time

conn = postgres.connect(host=" ", port="5432", user="", passwo&lt;/pre&gt;</description>
    <dc:creator>Rob Brown-Bayliss</dc:creator>
    <dc:date>2010-08-16T01:57:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5700">
    <title>callproc type casts</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5700</link>
    <description>&lt;pre&gt;I've got a plpython function, with a character varying param.
I can call it from sql.

But when i try to call it with psycopg2.callproc('testfunc', ['test']),
i've got the error:
function testfunc(unknown) does not exist
HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.

I'm using postgres 8.4.4 and psycopg2 2.0.14

Thanks in advance:
Imre Horvath
&lt;/pre&gt;</description>
    <dc:creator>Imre Horvath</dc:creator>
    <dc:date>2010-08-10T16:52:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5694">
    <title>callproc out params</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5694</link>
    <description>&lt;pre&gt;Hi!

Is there a way to call a stored procedure with output parameters from
psycopg2?

Thanks in advance:
Imre Horvath
&lt;/pre&gt;</description>
    <dc:creator>Imre Horvath</dc:creator>
    <dc:date>2010-08-05T19:11:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5678">
    <title>Infinite loop on error</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5678</link>
    <description>&lt;pre&gt;Psycopg has several loops in form:

while ((curs-&amp;gt;pgres = PQgetResult()) != NULL)
{
}

or

do {
  pgres = PQgetResult();
} while (pgres != NULL);


The problem is that if libpq gets so fatal error it decides
to close the connection, PQgetResult() will never return NULL
from that connection, thus infinite loop.

I suspect only good fix is to check connection status in all places:

  if (PQstatus(curs-&amp;gt;conn) == CONNECTION_BAD) { }

Also as the construct is complex enough, it seems to call for a single
function...

&lt;/pre&gt;</description>
    <dc:creator>Marko Kreen</dc:creator>
    <dc:date>2010-07-28T15:54:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5673">
    <title>query cancellation</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5673</link>
    <description>&lt;pre&gt;Hi,

here's a patch to support query cancellation via
http://www.postgresql.org/docs/8.4/static/libpq-cancel.html

It's based on top of my rollback_on_exit branch in
http://git.wulczer.org/?p=psycopg2.git, simply because I think the first
branch should be merged in first, but they're mostly independent.

You can cancel both synchronous and asynchronous queries, I haven't
tried green queries, but I think they should work too. I'll add support
for this in the Twisted wrapper soon, hopefully using Deferred cancellation.

Cheers,
Jan
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw&amp;lt; at &amp;gt;public.gmane.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Jan Urbański</dc:creator>
    <dc:date>2010-07-24T21:06:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5671">
    <title>Psycopg 2.2.x issue with PgBouncer</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5671</link>
    <description>&lt;pre&gt;I'm seeing an issue with how Psycopg 2.2.x handles connections with
PgBouncer.  After a connection is closed, PgBouncer spits out the
following:
  2010-07-23 16:33:46.407 5282 LOG C-0x1e9ad80:
test/postgres-savSHZN5Fh8qMp+WYRx65w&amp;lt; at &amp;gt;public.gmane.org:33306 login successful: db=test user=postgres
  2010-07-23 16:33:46.407 5282 LOG S-0x1eb8280:
test/postgres-savSHZN5Fh8qMp+WYRx65w&amp;lt; at &amp;gt;public.gmane.org:5432 new connection to server
  2010-07-23 16:33:46.411 5282 LOG C-0x1e9ad80:
test/postgres-savSHZN5Fh8qMp+WYRx65w&amp;lt; at &amp;gt;public.gmane.org:33306 closing because: client close request
(age=0)
  2010-07-23 16:33:46.411 5282 LOG S-0x1eb8280:
test/postgres-savSHZN5Fh8qMp+WYRx65w&amp;lt; at &amp;gt;public.gmane.org:5432 closing because: unclean server (age=0)

This kills PgBouncer's server backend which effectively kills
connection pooling.  I've reproduced this behavior with both 2.2.1 and
2.2.2, but I've verified that 2.0.14 does not have this issue.  I'm
running a clean build of PgBouncer 1.3.3 with the default
configuration on Ubuntu 9.&lt;/pre&gt;</description>
    <dc:creator>Jason Yan</dc:creator>
    <dc:date>2010-07-23T23:45:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5670">
    <title>Fw: [pgsql-hackers] standard_conforming_strings</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5670</link>
    <description>&lt;pre&gt;An ongoing thread on the pgsql-hackers I stumbled upon, involving psycopg too.

http://archives.postgresql.org/pgsql-hackers/2010-07/msg00939.php

&lt;/pre&gt;</description>
    <dc:creator>Daniele Varrazzo</dc:creator>
    <dc:date>2010-07-20T20:57:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5669">
    <title>RELEASE: psycopg 2.2.2</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5669</link>
    <description>&lt;pre&gt;_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw&amp;lt; at &amp;gt;public.gmane.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Federico Di Gregorio</dc:creator>
    <dc:date>2010-07-18T11:53:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5666">
    <title>Some spelling fixes</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5666</link>
    <description>&lt;pre&gt;Here is a patch with a few spelling fixes for the sources.
_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw&amp;lt; at &amp;gt;public.gmane.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Peter Eisentraut</dc:creator>
    <dc:date>2010-07-15T21:32:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5662">
    <title>error psycopg in Django/MacOSX</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5662</link>
    <description>&lt;pre&gt;_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw&amp;lt; at &amp;gt;public.gmane.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Daniel França</dc:creator>
    <dc:date>2010-07-13T03:15:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5660">
    <title>Hi!</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5660</link>
    <description>&lt;pre&gt;Hi 2 all! Good subscrubtion, thx!
________________________________________________
http://stydentkam.ru , http://ekzameny.net , http://referat-na-5.ru , http://hellocafe.ru , http://home-happy.ru , http://samkon.ru , http://scouts-russia.ru , http://bestxenon.ru , http://harmonia-plus.ru , http://kond-galereya.ru , http://divi-media.ru , http://v-peremen.ru , http://tonyfill.ru , http://v-peremen.ru , http://tbcom.ru , http://informkom.ru , http://aidsprint.ru , http://stydentam.ru , http://virtuallight.ru
&lt;/pre&gt;</description>
    <dc:creator>Мария Сергеева</dc:creator>
    <dc:date>2010-07-11T08:24:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5658">
    <title>Round of fixes, release</title>
    <link>http://comments.gmane.org/gmane.comp.python.db.psycopg.devel/5658</link>
    <description>&lt;pre&gt;_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/+sw&amp;lt; at &amp;gt;public.gmane.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Federico Di Gregorio</dc:creator>
    <dc:date>2010-07-10T15:03:19</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.db.psycopg.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.db.psycopg.devel</link>
  </textinput>
</rdf:RDF>
