Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - PGconn *conn = PQconnectdb("postgresql://sa:test@localhost:5435/test");
 - for(i=0; i<ITERATIONS;i++){
 - char buf[1024];
 - sprintf(buf,"INSERT INTO TEST(ID,NAME,FIELD,F2) VALUES(NEXTVAL('RESTART'),'%s','%d','%d')", name,i,i);
 - if (execCommand(conn, buf) != 0) {
 - printf("Command not executed\n");
 - exit(0);
 - }
 - }
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment