>> Unfortunately this is not possible because PostgreSQL doesn't retain the
>> original SQL entered (see the many discussions about this on the
>> pgsql-hackers list for details).
>>
> Yes, and I had quite some fights to get this pretty-print functions into
> the backend for guys like us that don't like dozens of parentheses and a
> view definition of 10k on a single line.
Hehehehe - we use all the pretty print stuff now in phpPgAdmin as well.
Chris