Files
postgresql/doc/src/sgml
Tom Lane ef799bdd04 Clamp total-tuples estimates for foreign tables to ensure planner sanity.
After running GetForeignRelSize for a foreign table, adjust rel->tuples
to be at least as large as rel->rows.  This prevents bizarre behavior
in estimate_num_groups() and perhaps other places, especially in the
scenario where rel->tuples is zero because pg_class.reltuples is
(suggesting that ANALYZE has never been run for the table).  As things
stood, we'd end up estimating one group out of any GROUP BY on such a
table, whereas the default group-count estimate is more likely to result
in a sane plan.

Also, clarify in the documentation that GetForeignRelSize has the option
to override the rel->tuples value if it has a better idea of what to use
than what is in pg_class.reltuples.

Per report from Jeff Janes.  Back-patch to all supported branches.

Patch by me; thanks to Etsuro Fujita for review

Discussion: https://postgr.es/m/CAMkU=1xNo9cnan+Npxgz0eK7394xmjmKg-QEm8wYG9P5-CcaqQ@mail.gmail.com
2020-07-03 19:01:21 -04:00
..
2018-07-16 10:44:06 +02:00
2020-02-10 08:51:42 +05:30
2017-10-20 19:26:10 -04:00
2018-06-20 16:01:18 +02:00
2019-08-20 13:45:58 +09:00
2018-06-20 16:06:03 +02:00
2017-10-17 15:10:33 -04:00
2017-10-17 15:10:33 -04:00
2018-07-16 10:44:06 +02:00
2017-10-17 15:10:33 -04:00
2017-10-17 15:10:33 -04:00
2018-07-16 10:44:06 +02:00
2018-10-03 13:11:44 -07:00
2018-04-03 09:47:18 -04:00
2020-01-01 12:21:44 -05:00
2019-02-21 15:39:37 +01:00
2020-06-15 13:14:43 +12:00
2018-07-16 10:44:06 +02:00
2017-10-17 15:10:33 -04:00
2018-08-14 22:56:07 +02:00
2017-10-17 15:10:33 -04:00
2017-10-17 15:10:33 -04:00
2019-08-20 13:45:58 +09:00
2018-11-23 11:41:41 +01:00
2017-11-23 09:44:28 -05:00
2019-08-20 13:45:58 +09:00
2019-08-20 13:45:58 +09:00
2017-08-15 14:37:44 -04:00
2019-08-20 13:45:58 +09: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