PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ pgui_copy_end()

static int pgui_copy_end ( const int  rollback)
static

Definition at line 398 of file shp2pgsql-gui.c.

References pg_connection, and pgui_logf().

Referenced by pgui_action_import().

399 {
400  char *errmsg = NULL;
401 
402  /* We need a connection to do anything. */
403  if ( ! pg_connection ) return 0;
404 
405  if ( rollback ) errmsg = "Roll back the copy.";
406 
407  /* Did something unexpected happen? */
408  if ( PQputCopyEnd(pg_connection, errmsg) < 0 )
409  {
410  /* Log errors and return failure. */
411  pgui_logf("Failed in pgui_copy_end(): %s", PQerrorMessage(pg_connection));
412  return 0;
413  }
414 
415  return 1;
416 }
static void pgui_logf(const char *fmt,...)
static PGconn * pg_connection
Here is the call graph for this function:
Here is the caller graph for this function: