Definition at line 533 of file pgsql2shp-core.c.
544 query = (
char *)
malloc(strlen(fname)+strlen(table)+
547 "select max(octet_length(\"%s\"::text)) from \"%s\".\"%s\"",
548 fname, schema, table);
552 query = (
char *)
malloc(strlen(fname)+strlen(table)+46);
554 "select max(octet_length(\"%s\"::text)) from \"%s\"",
558 LWDEBUGF(4,
"maxFieldLenQuery: %s\n", query);
562 if ( !
res || PQresultStatus(
res) != PGRES_TUPLES_OK )
564 printf(
_(
"Querying for maximum field length: %s"),
565 PQerrorMessage(
conn));
569 if (PQntuples(
res) <= 0 )
574 size = atoi(PQgetvalue(
res, 0, 0));
#define LWDEBUGF(level, msg,...)
static SHPCONNECTIONCONFIG * conn
References _, conn, free(), LWDEBUGF, malloc(), and window::res.
Referenced by ShpDumperOpenTable().