To clarify in what sense is Buddha omniscient (From The Perfection of Wisdom):
The Lord: So it is, Subhuti. It is thus that the perfection of wisdom
instructs the Tathagatas in this world. To the extent that the Tathagatas dwell in
intimate dependence on this dharma, the perfection of wisdom, to that extent are
those dharmas, which stand out for ever, fully known by the Tathagatas, through
their taking their stand nowhere. Thereby they dwell in close and intimate
dependence on just the Dharma. They treat the Dharma with respect, revere,
worship and adore it, for they know that this essential nature of dharmas is just
the perfection of wisdom. For the all-knowledge of the Tathagatas has been
brought about from this perfection of wisdom, and for that the Tathagatas are
grateful and thankful to her. With justice can the Tathagata be called ‘grateful
and thankful’ [kritajna kritavedin]. In gratitude and thankfulness the Tathagata
favours and cherishes the vehicle on which he has come, and the path by
which he has won full enlightenment. That one should know as the gratitude and
thankfulness of the Tathagata. In addition, the Tathagata has fully known all
dharmas as not made [akrita], as not unmade, as not brought together. This also
one should know as the gratitude and thankfulness of the Tathagata. For it is
thanks to the perfection of wisdom that the cognition of the Tathagata has thus
proceeded in all dharmas. That is another aspect of the fact that perfect wisdom
instructs the Tathagatas in this world.
So, there is omniscience, but this is all-knowledge of the emptiness of dharmas, not the knowledge about the dharmas. Why? Because "all dharmas are unthinkable, incomparable,immeasurable, incalculable, equal to the unequalled."
Subhuti: But how can perfect wisdom instruct the Tathagata in this world
if all dharmas are unknowable and imperceptible?
The Lord: It is good, Subhuti, that you should have decided to question
the Tathagata about this matter. All dharmas are indeed unknowable and
imperceptible. Because they are empty, and do not lean on anything. It is thus
that all those dharmas have, thanks to perfect wisdom, been fully known by theTathagatas.
Buddha does not know everything, he knows that everything is unknowable, as everything is empty. This is wisdom, while view-based knowledge is nothing but ignorance.
And now straight to the goal of the path:
Subhuti: How can there be a non-viewing of form, etc.?
The Lord: Where there arises an act of consciousness which has none of
the skandhas for objective support, there the non-viewing of form, etc., takes
place. But just this non-viewing of the skandhas is the viewing of the world. That
is the way in which the world is viewed by that Tathagata. It is thus that perfect
wisdom acts as an instructress in the world to the Tathagatas. And how does
perfect wisdom show up the world for what it is? She shows that the world is
empty, unthinkable, calmly quiet.