SQL formatter?

From: Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: SQL formatter?
Date: 2002-09-25 17:44:57
Message-ID: Pine.LNX.4.21.0209251342580.11079-100000@perrin.socsci.unc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Does anyone know of a routine for formatting SQL statements in a
structured way? Standalone or for emacs would be fine. I'm thinking of
something that could take a long SQL text statement and format it, e.g.:

select foo from bar where baz and bop and not boo;

becomes

SELECT foo
FROM bar
WHERE baz
AND bop
AND NOT boo
;

Thanks,
Andy

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists(at)perrin(dot)socsci(dot)unc(dot)edu * andrew_perrin (at) unc.edu

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gustavo Tadao Okida 2002-09-25 19:38:59 PL/pgsql
Previous Message Tom Lane 2002-09-25 17:12:03 Re: Getting current transaction id