Re: SQL formatter?

From: Andrew Perrin <clists(at)perrin(dot)socsci(dot)unc(dot)edu>
To: Philip Hallstrom <philip(at)adhesivemedia(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SQL formatter?
Date: 2002-09-26 15:49:15
Message-ID: Pine.LNX.4.21.0209261148370.11079-100000@perrin.socsci.unc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Unfortunately it is Windows based. The emacs mode for SQL is pretty
primitive too. Oh well - maybe I'll write one someday.

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

On Wed, 25 Sep 2002, Philip Hallstrom wrote:

> 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(at)perrin(dot)socsci(dot)unc(dot)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
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jean-Luc Lachance 2002-09-26 15:55:48 Re: start and end of the week
Previous Message Bruno Wolff III 2002-09-26 13:26:44 Re: start and end of the week