PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ pgui_copy_end()

static int pgui_copy_end ( const int  rollback)
static

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

References pg_connection, and pgui_logf().

Referenced by pgui_action_import().

400 {
401  char *errmsg = NULL;
402 
403  /* We need a connection to do anything. */
404  if ( ! pg_connection ) return 0;
405 
406  if ( rollback ) errmsg = "Roll back the copy.";
407 
408  /* Did something unexpected happen? */
409  if ( PQputCopyEnd(pg_connection, errmsg) < 0 )
410  {
411  /* Log errors and return failure. */
412  pgui_logf("Failed in pgui_copy_end(): %s", PQerrorMessage(pg_connection));
413  return 0;
414  }
415 
416  return 1;
417 }
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: