<?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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel">
    <title>gmane.comp.python.db.psycopg.devel</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5730"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5729"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5728"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5727"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5726"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5725"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5724"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5723"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5722"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5721"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5720"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5719"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5718"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5717"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5716"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5715"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5714"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5713"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5712"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5711"/>
      </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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5730">
    <title>Re: transaction commit</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5730</link>
    <description>&lt;pre&gt;Thanks but we are having real problems on Windows server with 
Zope/Psycopg/Postgresql. The data is being sent by zope but it's not 
getting committed to the database and in some cases is just 
disappearing, and to make it worse this is an intermittant fault. We 
have Postgres logging to the event viewer and when this occurs there is 
no Postgres log of the transaction so we have no idea what is going on.

Can anyone suggest how we could debug this scenario?
Thanks
Garry
&lt;/pre&gt;</description>
    <dc:creator>Garry Saddington</dc:creator>
    <dc:date>2010-09-04T11:24:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5729">
    <title>Re: transaction commit</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5729</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-09-04T09:34:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5728">
    <title>transaction commit</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5727">
    <title>Re: composite types</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5727</link>
    <description>&lt;pre&gt;Thanks,
I'll use type adaptation then, i don't want to build sql string in my
client...

Imre Horvath
2010. 08. 29, vasárnap keltezéssel 22.07-kor Daniele Varrazzo ezt írta:


_______________________________________________
Psycopg mailing list
Psycopg&amp;lt; at &amp;gt;lists.initd.org
http://lists.initd.org/mailman/listinfo/psycopg
&lt;/pre&gt;</description>
    <dc:creator>Imre Horvath</dc:creator>
    <dc:date>2010-08-30T06:10:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5726">
    <title>Re: composite types</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5726</link>
    <description>&lt;pre&gt;
If you are able to call the function from psql, i.e. using a syntax such as:

=&amp;gt; select myfunc(array[(10,'foo'),(20,'bar')]::mytype[]);

then you have to pass a similar string to a cur.execute (I don't think
callproc is going to be useful). You can use for instance:

# would call: "select myfunc(ARRAY[(E'foo', 10), (E'bar', 20)]::mytype[])"

if you have some object you defined yourself instead of a list of
tuples of strings and ints, and want psycopg to automatically convert
it, take a look at
http://initd.org/psycopg/docs/advanced.html#adapting-new-python-types-to-sql-syntax

&lt;/pre&gt;</description>
    <dc:creator>Daniele Varrazzo</dc:creator>
    <dc:date>2010-08-29T21:07:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5725">
    <title>Re: booleans</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5725</link>
    <description>&lt;pre&gt;On Sat, Aug 28, 2010 at 2:52 PM, Garry Saddington
&amp;lt;garry-5i1fM1l6rxR3vm4NAeV6PtBc4/FLrbF6&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:


Yes, you can write an adapter to convert the postgres boolean type
into the python values 1 and 0:

    psycopg2.extensions.BOOLEAN.values,
    "INTBOOL",
    lambda value, curs, _map={'t':1,'f':0, None:None}: _map[value])

(1, 0, None)

See http://initd.org/psycopg/docs/advanced.html#type-casting-from-sql-to-python
for details.

&lt;/pre&gt;</description>
    <dc:creator>Daniele Varrazzo</dc:creator>
    <dc:date>2010-08-29T20:54:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5724">
    <title>Re: Notify examples</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5724</link>
    <description>&lt;pre&gt;On Sat, Aug 28, 2010 at 5:31 PM, Marcelo Fernandez
&amp;lt;marcelo.fidel.fernandez-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:
[...]

There was a change in 2.2: in this version there has been a general
overhaul of the asynchronous methods and the fileno was moved from the
cursor to the connection, so it's the now connection to be put in the
select list.

Also, the svn trunk you refer to is out of date. Please check the
psycopg homepage for the url of the current repository, that has been
moved to git.

&lt;/pre&gt;</description>
    <dc:creator>Daniele Varrazzo</dc:creator>
    <dc:date>2010-08-29T20:35:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5723">
    <title>composite types</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5722">
    <title>composite types</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5721">
    <title>Notify examples</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5720">
    <title>booleans</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5719">
    <title>Re: NOTIFY payload patch</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5719</link>
    <description>&lt;pre&gt;
On Aug 26, 2010, at 10:33 AM, A.M. wrote:


So here is my draft attempt at a Notification class which behaves like a backwards-compatible tuple. This is my first work with the Python C API, so a thorough code review would be much appreciated- perhaps I missed some locking or memory management. With this patch, one can do this:

(123,'test')
test 123 payload

Please let me know how this can be improved. Thanks!

Cheers,
M

diff --git a/lib/notification.py b/lib/notification.py
new file mode 100644
index 0000000..c0814d9
--- /dev/null
+++ b/lib/notification.py
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+"""
+psycopg2.notification - represents a PostgreSQL NOTIFY with support for 9.0 payloads
+- see psycopg/connection_int.c to see where this is generated
+"""
+class Notification(tuple):
+    def __new__(cls,backendpid,name,payload=''):
+        return super(Notification,cls).__new__(cls,[backendpid,name])
+
+    def __init__(self,backendpid,name,payload=''):
+        self.backendpid = backendpid
+        self.name = name
+        self.&lt;/pre&gt;</description>
    <dc:creator>A.M.</dc:creator>
    <dc:date>2010-08-27T16:25:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5718">
    <title>Re: NOTIFY payload patch</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5718</link>
    <description>&lt;pre&gt;
On Aug 26, 2010, at 5:31 AM, Federico Di Gregorio wrote:


That's a good plan- I will work on this.

Cheers,
M
&lt;/pre&gt;</description>
    <dc:creator>A.M.</dc:creator>
    <dc:date>2010-08-26T14:33:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5717">
    <title>Re: NOTIFY payload patch</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5717</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-08-26T09:31:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5716">
    <title>Re: official git repo really old</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5716</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-08-26T08:47:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5715">
    <title>NOTIFY payload patch</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5714">
    <title>official git repo really old</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5713">
    <title>green polling to wait for notify</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5712">
    <title>Re: commit problems</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5712</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-08-23T16:11:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5711">
    <title>commit problems</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5710">
    <title>Re: Psycopg 2.2.x issue with PgBouncer</title>
    <link>http://permalink.gmane.org/gmane.comp.python.db.psycopg.devel/5710</link>
    <description>&lt;pre&gt;
I'm not familiar with changes in master.  The behaviour I was complaining
about - unexpectedly heavy .close()/.__del__() - is seen in 2.0.x.

If you are planning to document that as official feature,
then I give -1 to that.

I'd suggest pushing forward and remove any expensive operations from
.close() and document _that_ as feature.

&lt;/pre&gt;</description>
    <dc:creator>Marko Kreen</dc:creator>
    <dc:date>2010-08-17T12:23:29</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>
