Полезная информация

next up previous contents index
Next: Erasing the Query Buffer Up: Controlling a Session Previous: Typing in the Query

Displaying the Query Buffer

You can continue typing indefinitely, until you use a semicolon or backslash-g. Everything you type will be kept by psql until you are ready to send the query. If you use backslash-p (\p), you can even see everything that accumulated in the query buffer. In figure [*], three lines of text are accumulated and displayed by the user using backslash-p.

  
Figure: Backslash-p demo
\begin{figure}\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\raggedrigh...
...{}-{}-{}-
\par ~~~~~~~21
\par (1~row)~\\
~\\
test=>\end{list}\par
\end{figure}

After display, we use backslash-g to execute the query and return the value 21. This comes in handy with long queries.


Bruce Momjian
1999-11-21