I've got a dataset that consists of:

Table { date itemName }

The date typically is consecutive. You will find no replicates from the date [because it is the main key].

Now you ask , put into multiple parts (all regarding using SQL):

  1. Can you really find gaps within the date series indexed by the table? For instance: Dates 1/2/09-1/3/09 are missing
  2. Can you really find parts of dates which are missing in the table, which has a range more than n (this can be a number determined at run time)? For instance: For n = 2 Dates 1/2/09-1/3/09 aren't came back but Dates 5/6/09-6/1/09 are.

If you're able to use PostgreSQL 8.4 then window functions can help:

SELECT *
    FROM (SELECT itemName, date, date - lag(date) OVER w AS gap
              FROM someTable WINDOW w AS (ORDER BY date)
         ) AS pairs
    WHERE pairs.gap > '1 day'::interval;

Just produce a function in plsql or perhaps in a customer which is checking all dates. Such as this pseudocode:

date checked_date = 2000-01-01;
int unchecked_section = 0;
while ( checked_date <= today() ) {
  if (! sql(select itemName from Table where itemName=checked_date)) {
    unchecked_section++;
  } else {
    if ( unchecked_section>=n ) {
      print checked_date-unchecked_section, checked_date
    }
    unchecked_section = 0;
  }
  checked_date++;
}
if ( unchecked_section ) {
  print checked_date-unchecked_section, checked_date
}

It doesn't need to be extremely fast because it is maintenance only. There are not many dates to check on - only 365 annually.

After a little testing I emerged using the following SQL statement:

SELECT date, itemName
  FROM "Table" as t1
  WHERE NOT EXISTS (
     SELECT date 
     FROM "Table" as t2 
     WHERE t2.date = (t1.date - INTERVAL '1 day')
  )
  ORDER BY date
  OFFSET 1  -- this will skip the first element

This can enable you to get all rows which have no direct successor.

Should you customize the statement to:

SELECT date, itemName
  FROM "Table" as t1
  WHERE NOT EXISTS (
    SELECT date 
    FROM "Table" as t2 
    WHERE (t2.date >= (t1.date - INTERVAL '2 day'))
    AND (t2.date < t1.date)
  )
  ORDER BY date
  OFFSET 1

you should use the INTERVAL length within the subselect's WHERE clause to filter by gaps with a minimum of that size.

Hope that can help.