psql describe.c cleanup - Mailing list pgsql-hackers

From Josh Kupershmidt
Subject psql describe.c cleanup
Date
Msg-id BANLkTimXY3xdz7bdhWnHF2BTd2vcKPBTaQ@mail.gmail.com
Whole thread Raw
Responses Re: psql describe.c cleanup  (Peter Eisentraut <peter_e@gmx.net>)
Re: psql describe.c cleanup  (Merlin Moncure <mmoncure@gmail.com>)
Re: psql describe.c cleanup  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Hi all,

I use psql's -E mode every now and then, copy-and-pasting and further
tweaking the SQL displayed. Most queries are displayed terminated by a
semicolon, but quite a few aren't, making copy-and-paste just a bit
more tedious.

Attached is a patch to fix every SQL query I saw in describe.c. There
were also a few queries with trailing newlines, and I fixed those too.

And while I'm griping about describe.c, is it just me or is the source
code indentation in that file totally screwy? I'm using emacs and I've
loaded the snippet for pgsql-c-mode from
./src/tools/editors/emacs.samples into my ~/.emacs, but the
indentation of multiline strings still looks inconsistent. See
attached screenshot, e.g. the start of line 80 has four tabs and one
space, while line 79 has six tabs and two spaces?

Josh

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug in autovacuum.c?
Next
From: "Kevin Grittner"
Date:
Subject: Re: Fix for pg_upgrade user flag