refactor func-matching.sgml, make regexp* function more readable

Поиск
Список
Период
Сортировка
Искать

refactor func-matching.sgml, make regexp* function more readable

От:
jian he <jian.universality@gmail.com>
Дата:
Вложения:
hi.

https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP

section3 way too big.
The first big part is all these (regexp*) functions, the second part
is  (9.7.3.1. Regular Expression Details )

Please check the attached refactoring. output sample picture also attached.

All these functions (regexp_count, regexp_instr, regexp_like, regexp_match,
regexp_matches, regexp_replace, regexp_split_to_array, regexp_split_to_table,
regexp_substr) are explained/described one after another, which makes the
section (9.7.3 first part) feels a bit condensed.

So I’ve split them up and enclosed each in its own  section.
I used  to mark up each function’s syntax, followed by a detailed
description.  Since each function’s explanation is quite long, using  to
separate them seems more reasonable.

we could use  to group them, like
https://www.postgresql.org/docs/current/functions-json.html#SQLJSON-QUERY-FUNCTIONS
but we have many functions here, using  would be better than 
.

Re: refactor func-matching.sgml, make regexp* function more readable

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
jian he  writes:
> https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP
> section3 way too big.

> All these functions (regexp_count, regexp_instr, regexp_like, regexp_match,
> regexp_matches, regexp_replace, regexp_split_to_array, regexp_split_to_table,
> regexp_substr) are explained/described one after another, which makes the
> section (9.7.3 first part) feels a bit condensed.

> So I’ve split them up and enclosed each in its own  section.
> I used  to mark up each function’s syntax, followed by a detailed
> description.  Since each function’s explanation is quite long, using  to
> separate them seems more reasonable.

Yeah, this is clearly an improvement.

> we could use  to group them, like
> https://www.postgresql.org/docs/current/functions-json.html#SQLJSON-QUERY-FUNCTIONS
> but we have many functions here, using  would be better than 
. Agreed. I didn't try to put these into tables like most of the other functions are, precisely because the descriptions and examples are too long to fit nicely. But splitting the running text using seems helpful, and breaking the syntax summaries out-of-line with is an improvement too. I did some janitorial work on this (notably, I think some people's versions of DocBook don't like id strings containing underscores) and pushed it. regards, tom lane
FAQ