Re: psql describe.c cleanup
От | Merlin Moncure |
---|---|
Тема | Re: psql describe.c cleanup |
Дата | |
Msg-id | BANLkTi=PyZZELx+RtJhc26v_U8yPoCvh1w@mail.gmail.com обсуждение исходный текст |
Ответ на | psql describe.c cleanup (Josh Kupershmidt <schmiddy@gmail.com>) |
Ответы |
Re: psql describe.c cleanup
|
Список | pgsql-hackers |
On Sat, May 7, 2011 at 2:40 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote: > 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. I did a quick review and test of your patch. It didn't quite apply cleanly due to recent non-related describe.c changes -- updated patch attached. First, I'll give you a thumbs up on the original inspiration for the patch. The output should be standardized, and I see no reason not to append a semicolon on usability basis. Beyond that, the changes are mostly cosmetic and I can't see how it will break things outside of terminating a query early by accident (I didn't see any). What I do wonder though is if the ; appending should really be happening in printQuery() instead of in each query -- the idea being that formatting for external consumption should be happening in one place. Maybe that's over-thinking it though. merlin
Вложения
В списке pgsql-hackers по дате отправления: