--- trunk/pgest.c 2005/05/25 23:38:37 12 +++ trunk/pgest.c 2005/05/26 00:06:10 14 @@ -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 */