Definition at line 874 of file pgsql2shp-core.c.
901 sprintf(query,
"SELECT count(1), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\".\"%s\" GROUP BY 3",
908 sprintf(query,
"SELECT count(1), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\" GROUP BY 3",
919 sprintf(query,
"SELECT count(1) FROM \"%s\".\"%s\"", state->
schema, state->
table);
925 sprintf(query,
"SELECT count(1) FROM \"%s\"", state->
table);
929 LWDEBUGF(3,
"Table metadata query: %s\n", query);
931 res = PQexec(state->
conn, query);
934 if (PQresultStatus(
res) != PGRES_TUPLES_OK)
942 if (PQntuples(
res) == 0)
963 int typefound = 0, typemismatch = 0;
967 for (i = 0; i < PQntuples(
res); i++)
970 if (PQgetisnull(
res, i, 2))
1033 tmpint = atoi(PQgetvalue(
res, i, 1));
int geometry_type_from_string(const char *str, uint8_t *type, int *z, int *m)
Calculate type integer and dimensional flags from string input.
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define LWDEBUGF(level, msg,...)
char message[SHPDUMPERMSGLEN]
References _, shp_dumper_state::conn, free(), shp_dumper_state::geo_col_name, geometry_type_from_string(), LINETYPE, LWDEBUGF, lwtype_is_collection(), malloc(), shp_dumper_state::message, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, shp_dumper_state::outshptype, shp_dumper_state::outtype, POINTTYPE, POLYGONTYPE, window::res, shp_dumper_state::rowcount, shp_dumper_state::schema, SHPDUMPERERR, SHPDUMPERMSGLEN, SHPDUMPEROK, SHPT_ARC, SHPT_ARCM, SHPT_ARCZ, SHPT_MULTIPOINT, SHPT_MULTIPOINTM, SHPT_MULTIPOINTZ, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ, SHPT_POLYGON, SHPT_POLYGONM, SHPT_POLYGONZ, shp_dumper_state::table, and ovdump::type.
Referenced by ShpDumperOpenTable().