--- trunk/pgest.c 2005/05/25 23:38:37 12 +++ trunk/pgest.c 2005/05/26 00:16:48 16 @@ -92,10 +92,18 @@ } /* limit */ - if (! PG_ARGISNULL(3)) limit = PG_GETARG_INT32(3); + if (PG_ARGISNULL(3)) { + limit = 0; + } else { + limit = PG_GETARG_INT32(3); + } /* offset */ - if (! PG_ARGISNULL(4)) offset = PG_GETARG_INT32(4); + if (PG_ARGISNULL(4)) { + offset = 0; + } else { + offset = PG_GETARG_INT32(4); + } /* open the database */ @@ -206,7 +214,7 @@ values[0] = (char *) attr2text(doc,"@id"); values[1] = (char *) attr2text(doc,"@uri"); values[2] = (char *) attr2text(doc,"@title"); - values[3] = (char *) attr2text(doc,"@type"); + values[3] = (char *) attr2text(doc,"@size"); /* destloy the document object */ elog(DEBUG2, "est_doc_delete");