Greetings, I keep seeing statements like "Postgresql optimizer rewrites this query as...." What I'm curious about is, is there a way to obtain SQL form of the re-written queries somewhere in the chain of query evaluation? It does not make a lot sense to generate sql again, but it would help a lot to see the queries in their rewritten form.