Files
postgres/doc/src/sgml
Tom Lane 2bbe9112ae Add a \gexec command to psql for evaluation of computed queries.
\gexec executes the just-entered query, like \g, but instead of printing
the results it takes each field as a SQL command to send to the server.
Computing a series of queries to be executed is a fairly common thing,
but up to now you always had to resort to kluges like writing the queries
to a file and then inputting the file.  Now it can be done with no
intermediate step.

The implementation is fairly straightforward except for its interaction
with FETCH_COUNT.  ExecQueryUsingCursor isn't capable of being called
recursively, and even if it were, its need to create a transaction
block interferes unpleasantly with the desired behavior of \gexec after
a failure of a generated query (i.e., that it can continue).  Therefore,
disable use of ExecQueryUsingCursor when doing the master \gexec query.
We can still apply it to individual generated queries, however, and there
might be some value in doing so.

While testing this feature's interaction with single-step mode, I (tgl) was
led to conclude that SendQuery needs to recognize SIGINT (cancel_pressed)
as a negative response to the single-step prompt.  Perhaps that's a
back-patchable bug fix, but for now I just included it here.

Corey Huinker, reviewed by Jim Nasby, Daniel Vérité, and myself
2016-04-04 15:25:16 -04:00
..
2014-05-06 21:28:58 -04:00
2016-04-01 16:42:24 +03:00
2016-04-01 16:42:24 +03:00
2016-01-22 12:29:07 -05:00
2016-04-04 14:55:04 +03:00
2016-03-23 23:01:35 -03:00
2015-04-26 10:33:14 -04:00
2015-08-14 12:11:05 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-03-22 22:05:17 +09:00
2015-11-25 16:31:55 +03:00
2015-08-31 14:07:17 +02:00
2016-03-22 17:08:10 +03:00
2016-03-08 13:28:00 -05:00
2014-05-06 21:28:58 -04:00
2016-04-01 12:21:48 +03:00
2016-02-15 11:41:34 +01:00
2016-03-23 23:01:35 -03:00
2015-06-11 00:09:32 -04:00
2016-03-08 08:42:01 -05:00
2015-06-03 20:19:47 -04:00
2016-03-11 19:22:36 +03:00
2016-04-01 21:53:10 -04:00
2014-08-30 10:52:36 -05:00

<!-- doc/src/sgml/README.links -->

Linking within SGML documents can be confusing, so here is a summary:


Intra-document Linking
----------------------

<xref>
	use to get chapter/section number from the title of the target
	link, or xreflabel if defined at the target, or refentrytitle if target
        is a refentry;  has no close tag
	http://www.oasis-open.org/docbook/documentation/reference/html/xref.html

<link>
	use to supply text for the link, requires </link>
	http://www.oasis-open.org/docbook/documentation/reference/html/link.html

linkend=
	controls the target of the link/xref, required

endterm=
	for <xref>, allows the text of the link/xref to be taken from a
	different link target title


External Linking
----------------

<ulink>
	like <link>, but uses a URL (not a document target);  requires
	</ulink>; if no text is specified, the URL appears as the link
	text
	http://www.oasis-open.org/docbook/documentation/reference/html/ulink.html

url=
	used by <ulink> to specify the URL, required


Guidelines
----------

o  If you want to supply text, use <link>, else <xref>
o  Do not use text with <ulink> so the URL appears in printed output
o  Specific nouns like GUC variables, SQL commands, and contrib modules
   usually have xreflabels