22 #include "local_proto.h"
25 #include "pg_local_proto.h"
28 #define NOPG_UNUSED UNUSED
44 G_debug(3,
"V2_close_pg() name = %s mapset = %s", Map->name, Map->mapset);
49 pg_info = &(Map->fInfo.pg);
59 PQclear(pg_info->
res);
77 PQfinish(pg_info->
conn);
102 G_fatal_error(
_(
"GRASS is not compiled with PostgreSQL support"));
119 G_debug(3,
"V2_close_pg() name = %s mapset = %s", Map->name, Map->mapset);
124 if (Map->fInfo.pg.toposchema_name) {
135 if (access(file_path, F_OK) == 0)
143 G_warning(
_(
"Unable to save feature index file for vector map <%s>"),
150 G_fatal_error(
_(
"GRASS is not compiled with PostgreSQL support"));
int V2_close_pg(struct Map_info *Map NOPG_UNUSED)
Close vector map (PostGIS layer) on topological level (write out fidx file)
int V1_close_pg(struct Map_info *Map NOPG_UNUSED)
Close vector map (PostGIS layer) on level 1.
int db_close_database_shutdown_driver(dbDriver *)
Close driver/database connection.
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
int Vect_save_frmt(struct Map_info *)
Save format definition file for vector map.
int Vect_save_fidx(struct Map_info *, struct Format_info_offset *)
Save feature index file for vector map.
int Vect__write_head(struct Map_info *)
Writes head information to text file (GV_HEAD_ELEMENT)
#define VECT_OPEN(Map)
Check if vector map is open.
#define GV_DIRECTORY
Name of vector directory.
#define GV_MODE_WRITE
Write vector map open mode.
#define GV_TOPO_ELEMENT
Native format, topology file.
#define GV_MODE_RW
Read-write vector map open mode.
int Vect__execute_pg(PGconn *conn, const char *stmt)
Execute SQL statement.
void Vect__free_offset(struct Format_info_offset *offset)
void Vect__free_cache(struct Format_info_cache *cache)
char * Vect__get_element_path(char *file_path, struct Map_info *Map, const char *element)
Get map element full path (internal use only)