From: <gdr...@ya...> - 2003-05-09 19:17:42
|
Hello: Im trying to insert tuples through the copy sql like this: curs.execute('copy tablename from stdin;') curs.execute('2\t3\4\n') I get an error: self.res = self.conn.conn.query(_qstr) libpq.ProgrammingError: COPY state must be terminated first I can't find the way to send the tuples string. In C you can do the following: PQexec(conn,"copy foo from stdin"); PQputline(conn,"3\t4\n"); PQputline(conn,"\\.\n"; PQendcopy(conn); How can this be done with PgSQL?? _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com |