Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 402A547680E for ; Wed, 25 Sep 2002 16:20:30 -0400 (EDT) Received: from cypress.adhesivemedia.com (cypress.adhesivemedia.com [207.202.159.72]) by postgresql.org (Postfix) with ESMTP id 7239E4767D0 for ; Wed, 25 Sep 2002 16:20:29 -0400 (EDT) Received: from cypress.adhesivemedia.com (localhost [127.0.0.1]) by cypress.adhesivemedia.com (8.12.3/8.12.3) with ESMTP id g8PKJdFk055220; Wed, 25 Sep 2002 13:19:39 -0700 (PDT) (envelope-from philip@adhesivemedia.com) Received: from localhost (philip@localhost) by cypress.adhesivemedia.com (8.12.3/8.12.3/Submit) with ESMTP id g8PKJdWm055217; Wed, 25 Sep 2002 13:19:39 -0700 (PDT) X-Authentication-Warning: cypress.adhesivemedia.com: philip owned process doing -bs Date: Wed, 25 Sep 2002 13:19:39 -0700 (PDT) From: Philip Hallstrom To: Andrew Perrin Cc: pgsql-sql@postgresql.org Subject: Re: SQL formatter? In-Reply-To: Message-ID: <20020925131807.K47813-100000@cypress.adhesivemedia.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/320 X-Sequence-Number: 9597 Looks to be windows based, but... http://www.techno-kitten.com/PBL_Peeper/Online_Manual/SQL_Formatter/sql_formatter.html first hit when searching on google for "sql formatter". there were a lot of other options... You might look at how some of those C code indenter's work. Seems like some of them support multiple languages which means they maybe have some sort of "language definition" so maybe you could just write a sql one and it would just work. Of course I've never used one and don't know anything about it really so I could be wrong :) -philip On Wed, 25 Sep 2002, Andrew Perrin wrote: > 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@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu > > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >