Le Thu, 25 Oct 2007 13:27:40 +0200, Diez B. Roggisch a écrit :
> DB modules aren't necessarily thread-safe. Most of the times, a
> connection (and of course their cursor) can't be shared between threads.
>
> So open a connection for each thread.
>
> Diez
DB modules following DBAPI2 must define
If you're not Scott Daniels, beware that this conversation has gone
horribly off topic and, unless you have an interest in PostreSQL, you
may not want to bother reading on...
On Oct 25, 2007, at 9:46 PM, Scott David Daniels wrote:
> Erik Jones wrote:
>>
>> On Oct 25, 2007, at 7:28 AM, Scott D
Erik Jones wrote:
>
> On Oct 25, 2007, at 7:28 AM, Scott David Daniels wrote:
>> Diez B. Roggisch wrote:
>>> Abandoned wrote:
Hi..
I use the threading module for the fast operation. But
>> [in each thread]
def save(a,b,c):
cursor.execute("INSERT INTO ...
On Oct 25, 2007, at 10:12 AM, Jean-Paul Calderone wrote:
> On Thu, 25 Oct 2007 09:46:54 -0500, Erik Jones <[EMAIL PROTECTED]>
> wrote:
>>
>> [snip]
>>
>> Fortunately, in his case, that's not necessarily true. If they do
>> all their work with the same connection then, yes, but there are
>> othe
On Thu, 25 Oct 2007 09:46:54 -0500, Erik Jones <[EMAIL PROTECTED]> wrote:
>
> [snip]
>
>Fortunately, in his case, that's not necessarily true. If they do
>all their work with the same connection then, yes, but there are
>other problems with that as mention wrt thread safety and psycopg2.
>If he go
On Oct 25, 2007, at 7:28 AM, Scott David Daniels wrote:
> Diez B. Roggisch wrote:
>> Abandoned wrote:
>>
>>> Hi..
>>> I use the threading module for the fast operation. But
> [in each thread]
>>> def save(a,b,c):
>>> cursor.execute("INSERT INTO ...
>>> conn.commit()
>
Diez B. Roggisch wrote:
> Abandoned wrote:
>
>> Hi..
>> I use the threading module for the fast operation. But
[in each thread]
>> def save(a,b,c):
>> cursor.execute("INSERT INTO ...
>> conn.commit()
>> cursor.execute(...)
>> How can i insert data to postgr
On Thu, 25 Oct 2007 04:00:44 -0700, Abandoned <[EMAIL PROTECTED]> wrote:
>Hi..
>I use the threading module for the fast operation.
For fast operation, avoid the threading module. Here's a code sample:
conn = connect(...)
cursor = conn.cursor()
cursor.executemany("INSERT INTO keywords
Abandoned wrote:
> Hi..
> I use the threading module for the fast operation. But i have some
> problems..
> This is my code sample:
> =
> conn =
> psycopg2.connect(user='postgres',password='postgres',database='postgres')
> cursor = conn.cursor()
> class paralel(Thread):
> def _
Hi..
I use the threading module for the fast operation. But i have some
problems..
This is my code sample:
=
conn =
psycopg2.connect(user='postgres',password='postgres',database='postgres')
cursor = conn.cursor()
class paralel(Thread):
def __init__ (self, veriler, sayii):
10 matches
Mail list logo