postgresql/doc/src/sgml
Andrew Gierth 3b0fb2529f Fix SQL:2008 FETCH FIRST syntax to allow parameters.
OFFSET <x> ROWS FETCH FIRST <y> ROWS ONLY syntax is supposed to accept
<simple value specification>, which includes parameters as well as
literals. When this syntax was added all those years ago, it was done
inconsistently, with <x> and <y> being different subsets of the
standard syntax.

Rectify that by making <x> and <y> accept the same thing, and allowing
either a (signed) numeric literal or a c_expr there, which allows for
parameters, variables, and parenthesized arbitrary expressions.

Per bug #15200 from Lukas Eder.

Backpatch all the way, since this has been broken from the start.

Discussion: https://postgr.es/m/877enz476l.fsf@news-spur.riddles.org.uk
Discussion: http://postgr.es/m/152647780335.27204.16895288237122418685@wrigleys.postgresql.org
2018-05-21 17:32:24 +01:00
..
ref Fix SQL:2008 FETCH FIRST syntax to allow parameters. 2018-05-21 17:32:24 +01:00
.gitignore Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
acronyms.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
adminpack.sgml Doc: write some for adminpack. 2016-08-10 21:39:59 -04:00
advanced.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
arch-dev.sgml doc: Fix claim that query is passed as ASCII text 2013-05-30 21:09:27 -04:00
array.sgml Improve documentation about array concat operator vs. underlying functions. 2015-07-09 18:50:31 -04:00
auth-delay.sgml doc: Fix DocBook XML validity 2014-05-06 21:28:58 -04:00
auto-explain.sgml Fix failure of contrib/auto_explain to print per-node timing information. 2014-09-19 13:19:27 -04:00
backup.sgml Doc: clarify explanation of pg_dump usage. 2018-04-08 16:35:43 -04:00
bgworker.sgml Fix spi_worker mention in bgworker documentation 2016-01-28 14:08:21 +01:00
biblio.sgml Spelling fixes 2017-03-14 13:45:51 -04:00
bki.sgml Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
brin.sgml docs: Fix typo'd brin_summarize_new_values 2016-03-17 20:17:04 -03:00
btree-gin.sgml docs: consistently uppercase index method and add spacing 2015-05-15 11:42:34 -04:00
btree-gist.sgml doc: Fix typos 2016-07-14 22:28:41 -04:00
catalogs.sgml Again match pg_user_mappings to information_schema.user_mapping_options. 2017-08-07 07:09:31 -07:00
charset.sgml Docs: fix erroneous claim about max byte length of GB18030. 2015-05-14 14:59:00 -04:00
chkpass.sgml Add xreflabels to /contrib manuals so links appear correct. Also update 2011-05-07 22:29:20 -04:00
citext.sgml citext's regexp_matches() functions weren't documented, either. 2015-05-05 16:11:01 -04:00
client-auth.sgml doc: Spell checking 2015-09-10 21:40:06 -04:00
config.sgml doc: Fix links to pg_stat_replication 2018-03-03 14:13:52 -05:00
contacts.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
contrib-spi.sgml doc: in contrib-spi, mention and link to the meaning of SPI 2018-01-31 16:54:33 -05:00
contrib.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
cube.sgml doc: Tweak "cube" index entry 2015-09-26 21:02:24 -04:00
custom-scan.sgml doc: Spell checking 2015-09-10 21:40:06 -04:00
datatype.sgml docs: add parameter with brackets around varbit() 2018-03-30 13:34:12 -04:00
datetime.sgml Don't require dynamic timezone abbreviations to match underlying time zone. 2016-09-02 17:29:31 -04:00
dblink.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
ddl.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
dfunc.sgml Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:56 -04:00
dict-int.sgml Add xreflabels to /contrib manuals so links appear correct. Also update 2011-05-07 22:29:20 -04:00
dict-xsyn.sgml Add xreflabels to /contrib manuals so links appear correct. Also update 2011-05-07 22:29:20 -04:00
diskusage.sgml Get rid of pg_class.reltoastidxid. 2013-07-04 03:24:09 +09:00
dml.sgml Doc: add a section in Part II concerning RETURNING. 2016-11-22 14:03:09 -05:00
docguide.sgml doc: Check DocBook XML validity during the build 2014-10-21 14:46:38 -04:00
earthdistance.sgml Doc: update external URLs for PostGIS project. 2015-12-12 20:02:14 -05:00
ecpg.sgml printf("%lf") is not portable, so omit the "l". 2018-05-20 11:40:54 -04:00
errcodes.sgml Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
event-trigger.sgml doc: Fix typos and other minor issues 2017-09-01 23:12:32 -04:00
extend.sgml Don't qualify type pg_catalog.text in extend-extensions-example. 2018-03-23 20:31:06 -07:00
external-projects.sgml docs: remove "III" version text from pgAdmin link 2018-04-26 11:10:43 -04:00
fdwhandler.sgml Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE. 2017-11-27 17:54:11 -05:00
features.sgml Update SQL features/conformance information to SQL:2011 2012-05-17 09:50:04 +03:00
file-fdw.sgml Provide a FORCE NULL option to COPY in CSV mode. 2014-03-04 17:31:59 -05:00
filelist.sgml First draft of 9.5 release notes 2015-06-11 00:09:32 -04:00
fixrtf Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
func.sgml doc: document "IS NOT DOCUMENT" 2018-04-02 16:41:46 -04:00
fuzzystrmatch.sgml Improve levenshtein() docs. 2016-01-22 12:29:22 -05:00
generate-errcodes-table.pl Update copyright for 2015 2015-01-06 11:43:47 -05:00
geqo.sgml doc: Improve setup for documentation building with FOP 2013-10-21 06:43:08 -04:00
gin.sgml doc: Fix typo 2016-05-13 21:25:46 -04:00
gist.sgml Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
high-availability.sgml doc: Fix links to pg_stat_replication 2018-03-03 14:13:52 -05:00
history.sgml Add small doc mention that libpq is named after POSTQUEL. 2012-09-02 08:42:03 -04:00
hstore.sgml Add hstore_to_jsonb() and hstore_to_jsonb_loose() to hstore documentation. 2016-02-03 12:56:40 -05:00
indexam.sgml Add support for index-only scans in GiST. 2015-03-26 19:12:00 +02:00
indices.sgml Mention BRIN as able to do multi-column indexes 2016-03-28 19:11:12 -03:00
info.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
information_schema.sgml doc: Remove documentation of nonexistent information schema columns 2016-08-03 13:47:07 -04:00
install-windows.sgml Doc: specify that the minimum supported version of Perl is 5.8.3. 2017-07-31 13:42:48 -04:00
installation.sgml Doc: specify that the minimum supported version of Perl is 5.8.3. 2017-07-31 13:42:48 -04:00
intagg.sgml Add contrib function references in the doc index 2013-07-04 11:33:11 -04:00
intarray.sgml Add contrib function references in the doc index 2013-07-04 11:33:11 -04:00
intro.sgml Support automatically-updatable views. 2012-12-08 18:26:21 -05:00
isn.sgml Update URL reference material in /contrib/isn docs 2014-09-03 17:22:20 -04:00
jadetex.cfg Improve our workaround for 'TeX capacity exceeded' in building PDF files. 2015-11-10 16:00:13 -05:00
json.sgml Docs: add example clarifying use of nested JSON containment. 2015-10-29 18:54:44 -04:00
keywords.sgml Update key words table for 9.5 2015-08-14 12:10:35 -04:00
legal.sgml Update copyright for 2018 2018-01-02 23:30:12 -05:00
libpq.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
lo.sgml Add more limited large object trigger example. 2012-08-14 23:25:20 -04:00
lobj.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
logicaldecoding.sgml doc: Fix typos and other minor issues 2017-09-01 23:12:32 -04:00
ltree.sgml doc: remove mention of the DMOZ catalog in ltree docs 2018-04-05 15:55:41 -04:00
maintenance.sgml Doc: update URL for check_postgres. 2017-11-01 22:07:37 -04:00
Makefile Add -wnet to SP invocations 2017-11-10 08:32:22 -05:00
manage-ag.sgml doc: Spell checking 2015-09-10 21:40:06 -04:00
mk_feature_tables.pl Run newly-configured perltidy script on Perl files. 2012-07-04 21:47:49 -04:00
monitoring.sgml Add system view pg_stat_ssl 2015-04-12 19:07:46 +02:00
mvcc.sgml Back-patch fcff8a5751 as a bug fix. 2016-12-13 19:14:42 -06:00
nls.sgml Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
notation.sgml doc: Remove paragraph about typesetting conventions 2013-05-31 22:45:03 -04:00
oid2name.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
pageinspect.sgml doc: Whitespace and formatting fixes 2015-08-20 22:34:35 -04:00
passwordcheck.sgml Remove support for native krb5 authentication 2014-01-19 17:05:01 +01:00
perform.sgml doc: Fix figures in example description 2017-12-18 16:02:49 -05:00
pgbuffercache.sgml Fix obsolete header-file reference in pg_buffercache docs. 2016-07-13 11:17:15 -04:00
pgcrypto.sgml pgcrypto's encrypt() supports AES-128, AES-192, and AES-256 2018-01-31 16:33:31 -05:00
pgfreespacemap.sgml doc: Fix DocBook XML validity 2014-05-06 21:28:58 -04:00
pgprewarm.sgml Small grammar fix 2015-08-31 14:07:41 +02:00
pgrowlocks.sgml docs: remove unnecessary references to old PG versions 2014-02-24 12:56:37 -05:00
pgstandby.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
pgstatstatements.sgml Docs: explain contrib/pg_stat_statements' handling of GC failure. 2015-10-05 12:44:20 -04:00
pgstattuple.sgml Explain unaccounted for space in pgstattuple. 2016-12-27 11:28:26 -05:00
pgtrgm.sgml docs: consistently uppercase index method and add spacing 2015-05-15 11:42:34 -04:00
planstats.sgml Add security checks to selectivity estimation functions 2017-05-08 09:19:07 -04:00
plhandler.sgml Document security implications of check_function_bodies. 2014-02-17 09:33:31 -05:00
plperl.sgml doc: Fix DocBook XML validity 2014-05-06 21:28:58 -04:00
plpgsql.sgml Fix sample INSTR() functions in the plpgsql documentation. 2018-01-10 17:13:29 -05:00
plpython.sgml Document that PL/Python now returns floats using repr() not str(). 2015-09-01 19:25:58 -04:00
pltcl.sgml Rationalize and document pltcl's handling of magic ".tupno" array element. 2016-11-06 14:43:13 -05:00
postgres-fdw.sgml Add docs about postgres_fdw's setting of search_path and other GUCs. 2015-08-15 14:31:11 -04:00
postgres.sgml Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
problems.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
protocol.sgml Fix typo. 2018-03-21 23:11:56 +09:00
queries.sgml Doc: clarify description of degenerate NATURAL joins. 2017-07-20 12:41:37 -04:00
query.sgml Use "backend process" rather than "backend server", where appropriate. 2011-03-12 09:38:56 -05:00
rangetypes.sgml docs: Map operator @> to the proper SGML escape for '>' 2015-10-07 09:42:26 -04:00
README.links docs: improve xref description for xreflabel and refentry links 2014-01-30 12:26:18 -05:00
recovery-config.sgml Ignore recovery_min_apply_delay until recovery has reached consistent state 2016-03-06 02:43:17 +09:00
reference.sgml Add transforms feature 2015-04-26 10:33:14 -04:00
regress.sgml Lock down regression testing temporary clusters on Windows. 2014-12-17 22:48:40 -05:00
release-7.4.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-8.0.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-8.1.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-8.2.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-8.3.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-8.4.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-9.0.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release-9.1.sgml doc: Fix links to pg_stat_replication 2018-03-03 14:13:52 -05:00
release-9.2.sgml Last-minute updates for release notes. 2017-11-06 12:02:30 -05:00
release-9.3.sgml Last-minute updates for release notes. 2018-05-07 13:13:46 -04:00
release-9.4.sgml Last-minute updates for release notes. 2018-05-07 13:13:46 -04:00
release-9.5.sgml Last-minute updates for release notes. 2018-05-07 13:13:46 -04:00
release-old.sgml doc: update markup for release note "release date" block 2017-05-12 18:32:01 -04:00
release.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
replication-origins.sgml Fix ordering/categorization of some recently-added system views. 2016-05-05 12:33:13 -04:00
rowtypes.sgml Doc: improve documentation about composite-value usage. 2016-11-22 17:56:16 -05:00
rules.sgml Fix creation of resjunk tlist entries for inherited mixed UPDATE/DELETE. 2017-11-27 17:54:11 -05:00
runtime.sgml doc: update intermediate certificate instructions 2018-01-20 21:47:02 -05:00
seg.sgml Add xreflabels to /contrib manuals so links appear correct. Also update 2011-05-07 22:29:20 -04:00
sepgsql.sgml Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
sourcerepo.sgml Change default git repo URL to https 2018-02-07 11:05:03 +01:00
sources.sgml Fix misc typos. 2015-09-05 11:36:18 +03:00
spgist.sgml Add an in-core GiST index opclass for inet/cidr types. 2014-04-08 15:46:43 -04:00
spi.sgml doc: in contrib-spi, mention and link to the meaning of SPI 2018-01-31 16:54:33 -05:00
sql.sgml Implement SKIP LOCKED for row-level locks 2014-10-07 17:23:34 -03:00
sslinfo.sgml doc: Fix DocBook XML validity 2014-05-06 21:28:58 -04:00
standalone-install.sgml Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
start.sgml Fix wording in the Tutorial document. 2016-02-21 09:16:55 +09:00
storage.sgml Fix mention of htup.h in storage.sgml 2015-10-01 23:13:07 +09:00
stylesheet-common.xsl doc: Disable preface.autolabel in XSLT 2013-12-01 17:13:23 -05:00
stylesheet-fo.xsl doc: Fix PDF build with FOP 2015-06-03 20:19:47 -04:00
stylesheet-hh.xsl Fix display of <command> elements on man pages 2012-04-30 21:18:03 +03:00
stylesheet-man.xsl Fix warnings in man page build 2018-03-08 13:32:10 -05:00
stylesheet.css Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
stylesheet.dsl doc: Move website-stylesheet setting to a more appropriate location 2014-12-11 21:48:01 -05:00
stylesheet.xsl Change documentation references to PG website to use https: not http: 2017-05-20 21:50:47 -04:00
syntax.sgml Doc: remove duplicate index entry. 2017-02-16 11:30:17 -05:00
tablefunc.sgml Add contrib function references in the doc index 2013-07-04 11:33:11 -04:00
tablesample-method.sgml Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
tcn.sgml Reduce messages about implicit indexes and sequences to DEBUG1. 2012-07-04 20:35:29 -04:00
test-decoding.sgml doc: Fix spacing in verbatim environments 2014-07-08 11:39:36 -04:00
textsearch.sgml docs: update guidelines on when to use GIN and GiST indexes 2015-10-05 13:38:36 -04:00
trigger.sgml Doc: note that statement-level view triggers require an INSTEAD OF trigger. 2018-03-18 15:10:28 -04:00
tsearch2.sgml Add xreflabels to /contrib manuals so links appear correct. Also update 2011-05-07 22:29:20 -04:00
tsm-system-rows.sgml Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
tsm-system-time.sgml Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
typeconv.sgml Doc: add example of type resolution in nested UNIONs. 2018-03-25 16:15:16 -04:00
unaccent.sgml Allow multi-character source strings in contrib/unaccent. 2014-06-30 21:46:29 -04:00
user-manag.sgml Document security implications of search_path and the public schema. 2018-02-26 07:39:48 -08:00
uuid-ossp.sgml doc: Reflect renaming of Mac OS X to OS X 2014-09-09 13:56:29 -04:00
vacuumlo.sgml doc: Improve DocBook XML validity 2014-02-23 21:31:08 -05:00
wal.sgml Fix grammar 2017-03-07 22:46:39 -05:00
xaggr.sgml Improve speed of aggregates that use array_append as transition function. 2016-10-30 12:27:41 -04:00
xfunc.sgml Doc: improve documentation about composite-value usage. 2016-11-22 17:56:16 -05:00
xindex.sgml doc: Fix typo 2016-05-01 21:34:41 -04:00
xml2.sgml doc: Various typo/grammar fixes 2014-08-30 10:52:36 -05:00
xoper.sgml doc: Various typo/grammar fixes 2014-08-30 10:52:36 -05:00
xplang.sgml Update documentation to reflect that standard PLs are now extensions. 2011-03-05 01:08:38 -05:00
xtypes.sgml Support "expanded" objects, particularly arrays, for better performance. 2015-05-14 12:08:49 -04: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