I wrote: > ... I'd suggest recasting this as a join between > pg_catalog and pg_attribute, which would make the join condition > just "where c.oid = a.attrelid". Sigh, that should be "between pg_class and pg_attribute" of course. I'm really only firing on one cylinder today :-( regards, tom lane