| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
| |
"ECHO all" is ignored for interactive input, and has been for a very long
time, though possibly not for as long as the documentation has claimed the
opposite. Fix that, and also note that empty lines aren't echoed, which
while dubious is another longstanding behavior (it's embedded in our
regression test files for one thing). Per bug #12721 from Hans Ginzel.
In HEAD, also improve the code comments in this area, and suppress an
unnecessary fflush(stdout) when we're not echoing. That would likely
be safe to back-patch, but I'll not risk it mere hours before a release
wrap.
|
|
|
|
| |
Backpatch certain files through 9.0
|
|
|
|
|
|
|
|
|
|
| |
Apparently, this is a very common mistake for users to make; it is
better to have it fail reasonably rather than throw potentially a large
number of errors. Since we have a magic string at the start of the
file, we can detect the case easily and there's no other possible useful
behavior anyway.
Author: Craig Ringer
|
|
|
|
|
|
|
|
| |
The new %l substitution shows the line number inside a (potentially
multi-line) statement starting from one.
Author: Sawada Masahiko, heavily editorialized by me.
Reviewed-By: Jeevan Chalke, Alvaro Herrera
|
|
|
|
|
| |
This includes removing tabs after periods in C comments, which was
applied to back branches, so this change should not effect backpatching.
|
|
|
|
|
| |
Update all files in head, and files COPYRIGHT and legal.sgml in all back
branches.
|
|
|
|
|
| |
Fully update git head, and update back branches in ./COPYRIGHT and
legal.sgml files.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
the client encoding is UTF-8.
a limited version of a patch proposed by Itagaki Takahiro
|
|
|
|
|
|
|
|
|
| |
mainloop.c. This ensures that postgres_fe.h is read before including
any system headers, which is necessary to avoid problems on some platforms
where we make nondefault selections of feature macros for stdio.h or
other headers. We have had this policy for flex modules in the backend
for many years, but for some reason it was not applied to psql.
Per trouble report from Alexandra Roy and diagnosis by Albe Laurenz.
|
|
|
|
| |
provided by Andrew.
|
| |
|
|
|
|
|
|
|
|
|
| |
results (ie, an empty "broken" buffer) if memory overrun occurs anywhere
along the way to filling the buffer. The previous coding would just silently
discard portions of the intended buffer contents, as exhibited in trouble
report from Sam Mason. Also, tweak psql's main loop to correctly detect
and report such overruns. There's probably much more that should be done
in this line, but this is a start.
|
|
|
|
|
|
| |
Basically just reuse the same text that psql emitted as part of
its startup banner in prior versions, and make some whitespace
more consistent with the conventions in other psql command output.
|
|
|
|
|
|
|
|
|
|
| |
Add a few "help" entries.
Move \g help entry into "General".
Update psql version mismatch warning text.
Joshua D. Drake
|
| |
|
|
|
|
| |
Greg Sabino Mullane
|
|
|
|
| |
Greg Sabino Mullane
|
| |
|
| |
|
|
|
|
| |
back-stamped for this.
|
| |
|
|
|
|
|
|
|
|
|
| |
existing for backend GUC variables, and use this to eliminate repeated
fetching/parsing of psql variables in psql's inner loops. In a trivial
test with lots of 'select 1;' commands, psql's CPU time went down almost
10%, although of course the effect on total elapsed time was much less.
Per discussion about how to ensure the upcoming FETCH_COUNT patch doesn't
cost any performance when not being used.
|
|
|
|
| |
David Fetter
|
| |
|
|
|
|
|
|
|
|
|
| |
places --- that risks corrupting data structures, losing sync with the
backend, etc. We now longjmp only from calls to readline, fgets, and
fread, which we assume are coded to protect themselves against interrupts
at undesirable times. This requires adding explicit tests for
cancel_pressed in long-running loops, but on the whole it's far cleaner.
Martijn van Oosterhout and Tom Lane.
|
|
|
|
|
| |
failure to enter commands in history if canceled by control-C, other
infelicities.
|
|
|
|
| |
than only if there is already history.
|
|
|
|
| |
making it volatile.
|
|
|
|
| |
executed, like it did for 8.1.X.
|
|
|
|
| |
the query.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> 1) Fix the problems with the \s command.
> When the saveHistory is executed by the \s command we must not do the
> conversion \n -> \x01 (per
> http://archives.postgresql.org/pgsql-hackers/2006-03/msg00317.php )
>
> 2) Fix the handling of Ctrl+C
>
> Now when you do
> wsdb=# select 'your long query here '
> wsdb-#
> and press afterwards the CtrlC the line "select 'your long query here
'"
> will be in the history
>
> (partly per
> http://archives.postgresql.org/pgsql-hackers/2006-03/msg00297.php )
>
> 3) Fix the handling of commands with not closed brackets, quotes,
double
> quotes. (now those commands are not splitted in parts...)
>
> 4) Fix the behaviour when SINGLELINE mode is used. (before it was
almost
> broken ;(
Sergey E. Koposov
|
|
|
|
| |
remain as part of the multi-line query.
|
|
|
|
|
| |
statements before the multi-line statement, rather than inside the
multi-line statement.
|
| |
|
|
|
|
|
|
|
|
| |
Currently, while \e saves a single statement as one entry, interactive
statements are saved one line at a time. Ideally all statements
would be saved like \e does.
Sergey E. Koposov
|
|
|
|
| |
password encryption. Also alter createuser command to the same effect.
|
| |
|
|
|
|
| |
macros around strings that were missing them.
|
| |
|
|
|
|
|
|
| |
Use this new function in psql. Implement query cancellation in psql for
Windows. Code by Magnus Hagander, documentation and minor editorialization
by Tom Lane.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
recent discussion. The lexer is used for both SQL command text and
backslash commands. The purpose of this change is to make it easier to
track the behavior of the backend's SQL lexer --- essentially identical
flex rules are now used by psql. Also, this cleans up a lot of very
squirrelly code in mainloop.c and command.c. The flex code is somewhat
bulkier than the removed code, but should be lots easier to maintain.
|
|
|
|
| |
pg_malloc, to avoid linker failures on same platforms.
|
|
|
|
|
|
|
| |
little more sane. Some parts of the code was using a static function
xmalloc() that did safe memory allocation (where "safe" means "bail
out on OOM"), but most of it was just invoking calloc() or malloc()
directly. Now almost everything invokes xmalloc() or xcalloc().
|