Re: [pgadmin-hackers] Import: I need help

2009-02-13 Thread Dave Page
On Fri, Feb 13, 2009 at 9:21 AM, Quan Zongliang wrote: > And more one question: > I think the import work should get a new PGconn instance before it starts. > in document: http://www.postgresql.org/docs/8.3/static/libpq-copy.html said: > It is not possible to execute other SQL commands using the

Re: [pgadmin-hackers] Import: I need help

2009-02-13 Thread Quan Zongliang
> Those values may, in theory, change between versions of the server, > and also won't exist for user defined types. In fact, another type constants had been defined in utils\pgDefs.h and used in the dlgTypeProperty class. When I validated the bug report about bit varying from Mr. Hiromichi Nakaji

Re: [pgadmin-hackers] Import: I need help

2009-02-13 Thread Quan Zongliang
> The second way is to use SAVEPOINT. > You can use savepoints: > http://www.postgresql.org/docs/8.3/interactive/sql-savepoint.html This a good idea. I forgot it. > I think you should take a look at pgloader: > http://pgfoundry.org/projects/pgloader/ Ok, before the work go on, I study from the

Re: [pgadmin-hackers] Import: I need help

2009-02-13 Thread Guillaume Lelarge
Hi, Quan Zongliang a écrit : > [...] > I haven't any experience with libpq. So there are a lot of questions. > > When import to db using INSERT statement. Like this: >res = PQexec(m_conn->connection(), "BEGIN"); >LOOP: res = PQexec(m_conn->connection(), "INSERT INTO ..."); >res = PQex

Re: [pgadmin-hackers] Import: I need help

2009-02-13 Thread Dave Page
Hi, On Fri, Feb 13, 2009 at 3:08 AM, Quan Zongliang wrote: > Hi, all > > I haven't any experience with libpq. So there are a lot of questions. > > When import to db using INSERT statement. Like this: > res = PQexec(m_conn->connection(), "BEGIN"); > LOOP: res = PQexec(m_conn->connection(), "IN