RE: SQL pretty pritner?

Поиск
Список
Период
Сортировка
От Kevin Brannen
Тема RE: SQL pretty pritner?
Дата
Msg-id DM6PR19MB3451EA8C436370A9D4D46EA2A4660@DM6PR19MB3451.namprd19.prod.outlook.com
обсуждение исходный текст
Ответ на Re: SQL pretty pritner?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
>From: Adrian Klaver <adrian.klaver@aklaver.com>
>On 10/27/19 3:21 PM, stan wrote:
>> I have a presentation later in the week, and i plan on printing out
>> some files containing SQL commands. I have used some "pretty printers"
>> in the past for things like Perl scripts. What I am thinking of s
>> something that bolds keywords, handles page breaks, and does some formatting.
>
>http://sqlformat.darold.net/
>
>https://sourceforge.net/projects/pgformatter/

If I had that task, I'd use a combo of tools. "pgFormatter" that Adrian shows
above is what you use to reformat to make it aligned nicely, plus it does some
colorization. The first link is the online tool; the 2nd link is if you want
to download the code to your own server.

Example:
select count(*) from tablea where x is null;
Result:
SELECT
    count(*)
FROM
    tablea
WHERE
    x IS NULL;

You can't see it here, but all the keywords are bold and colored, and "count" is
colored but not bolded.

If that colorization isn't good enough for you, then as others have said,
paste the result into "vim" to get the colorization, pasting that into
PowerPoint/Word or something that honors the colors...or just take a screen
shot of that...or whatever works for you.

HTH,
Kevin
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential
information.If you are not the intended recipient, or a person responsible for delivering it to the intended recipient,
youare hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or
attachedto this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately
notifyus by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them
todisk. Thank you.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: ZhenHua Cai
Дата:
Сообщение: Re: PostgreSQL - unrecognized win32 error code: 38
Следующее
От: Reid Thompson
Дата:
Сообщение: Re: SQL pretty pritner?