char *query;
PGresult *res;
- query = malloc(sizeof(table)+sizeof(usrquery)+256);
+ query = malloc(strlen(table)+strlen(usrquery)+32);
sprintf(query, "CREATE TEMP TABLE \"%s\" AS %s", table, usrquery);
printf("Preparing table for user query... ");
/**********************************************************************
* $Log$
+ * Revision 1.74.2.3 2005/07/12 16:19:29 strk
+ * Fixed bug in user query handling, reported by Andrew Seales
+ *
* Revision 1.74.2.2 2005/05/16 17:51:17 strk
* BUGFIX in attribute names unicity enforcement
*