psql describe.c cleanup
Josh Kupershmidt <schmiddy@gmail.com>
From: Josh Kupershmidt <schmiddy@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-05-07T19:40:35Z
Lists: pgsql-hackers
Attachments
- psql_describe.v2.patch (text/x-patch) patch v2
- emacs_describe.c_screnshot.png (image/png)
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