Re: Copy database with python..

2007-11-04 Thread Bruno Desthuilliers
Abandoned a écrit : > Hi. > I want to copy my database but python give me error when i use this > command. > cursor.execute("pg_dump mydata > old.dump") > What is the problem ? Could it have to do with the fact that cursor.execute expects a valid SQL query - not a bash command line ? > And how

Re: Copy database with python..

2007-11-03 Thread Erik Jones
On Nov 2, 2007, at 11:49 AM, Diez B. Roggisch wrote: > Abandoned wrote: > >> On Nov 2, 4:19 pm, Paul McNett <[EMAIL PROTECTED]> wrote: >>> Abandoned wrote: Hi. I want to copy my database but python give me error when i use this command. cursor.execute("pg_dump mydata > old.dump

Re: Copy database with python..

2007-11-02 Thread Diez B. Roggisch
Abandoned wrote: > On Nov 2, 4:19 pm, Paul McNett <[EMAIL PROTECTED]> wrote: >> Abandoned wrote: >> > Hi. >> > I want to copy my database but python give me error when i use this >> > command. >> > cursor.execute("pg_dump mydata > old.dump") >> > What is the problem ? And how can i copy the databa

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
> "Abandoned" == Abandoned <[EMAIL PROTECTED]> writes: Abandoned> Yes i understand thank you. Now i find that maybe help the Abandoned> other users. Abandoned> import os Abandoned> os.system("su postgres") Abandoned> ... I get the distinct impression that you're trying to replace simple shel

Re: Copy database with python..

2007-11-02 Thread Abandoned
On Nov 2, 4:19 pm, Paul McNett <[EMAIL PROTECTED]> wrote: > Abandoned wrote: > > Hi. > > I want to copy my database but python give me error when i use this > > command. > > cursor.execute("pg_dump mydata > old.dump") > > What is the problem ? And how can i copy the database with python ? > > You a

Re: Copy database with python..

2007-11-02 Thread Abandoned
On Nov 2, 4:11 pm, Martin Sand Christensen <[EMAIL PROTECTED]> wrote: > > "Abandoned" == Abandoned <[EMAIL PROTECTED]> writes: > > Abandoned> I want to copy my database but python give me error when i > Abandoned> use this command. cursor.execute("pg_dump mydata > old.dump") > Abandoned> What

Re: Copy database with python..

2007-11-02 Thread Paul McNett
Abandoned wrote: > Hi. > I want to copy my database but python give me error when i use this > command. > cursor.execute("pg_dump mydata > old.dump") > What is the problem ? And how can i copy the database with python ? You are just going to have to give us more to go on. Please post the entire

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
> "Abandoned" == Abandoned <[EMAIL PROTECTED]> writes: Abandoned> I want to copy my database but python give me error when i Abandoned> use this command. cursor.execute("pg_dump mydata > old.dump") Abandoned> What is the problem ? cursor.execute() is for executing SQL commands, and this is no

Re: Copy database with python..

2007-11-02 Thread Carsten Haese
On Fri, 2007-11-02 at 06:51 -0700, Abandoned wrote: > Hi. > I want to copy my database but python give me error when i use this > command. > cursor.execute("pg_dump mydata > old.dump") cursor.execute executes SQL queries. pg_dump is not an SQL query, it is an operating system command. To execute O

Copy database with python..

2007-11-02 Thread Abandoned
Hi. I want to copy my database but python give me error when i use this command. cursor.execute("pg_dump mydata > old.dump") What is the problem ? And how can i copy the database with python ? Note: The database's size is 200 GB -- http://mail.python.org/mailman/listinfo/python-list