Definition at line 534 of file pgsql2shp-core.c.
References _, free(), LWDEBUGF, malloc(), and window::res.
Referenced by ShpDumperOpenTable().
545 query = (
char *)
malloc(strlen(fname)+strlen(table)+
548 "select max(octet_length(\"%s\"::text)) from \"%s\".\"%s\"",
549 fname, schema, table);
553 query = (
char *)
malloc(strlen(fname)+strlen(table)+46);
555 "select max(octet_length(\"%s\"::text)) from \"%s\"",
559 LWDEBUGF(4,
"maxFieldLenQuery: %s\n", query);
561 res = PQexec(
conn, query);
563 if ( ! res || PQresultStatus(res) != PGRES_TUPLES_OK )
565 printf(
_(
"Querying for maximum field length: %s"),
566 PQerrorMessage(
conn));
570 if (PQntuples(res) <= 0 )
575 size = atoi(PQgetvalue(res, 0, 0));
static SHPCONNECTIONCONFIG * conn
#define LWDEBUGF(level, msg,...)