On Wed, Aug 08, 2012 at 04:08:03PM -0400, Wietse Venema wrote: > email builder: > > Postfix expects an empty set (i.e. no rows returned) if it is to respond > > negatively that a virtual alias does not exist. > > Returning NULL does not equal no rows returned. > > email builder: > >Are you sure?? > > 100% confirmed. To return NOTFOUND, you MUST return NO RESULT.
The common code that underlies the MySQL, PgSQL and LDAP table drivers ignores empty result values with a warning. While NULL result values are silently ignored you should not depend on this undocumented behaviour. We should update the documentation for empty results, right now the documentation of "%s" in the result format only says that empty results are skipped, without mentioning the warning and that queries should not be constructed to yield empty result columns. The situation with "%u" and "%d" in the result format is a bit more subtle, since these are potentially empty parts of a non-empty address, so no warnings are issued when "%u" or "%d" are empty, but the result value is still skipped. -- Viktor.