pgsql: Fix typos.

2020-11-02 Thread Amit Kapila
Fix typos. Author: Hou Zhijie Discussion: https://postgr.es/m/855a9421839d402b8b351d273c89a8f8@G08CNEXMBPEKD05.g08.fujitsu.local Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8c2d8f6cc4848cf9276dff445bb0f2f664083eca Modified Files -- src/backend/stor

pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.

2020-11-02 Thread Tom Lane
Fix unportable use of getnameinfo() in pg_hba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) rather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11:

pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.

2020-11-02 Thread Tom Lane
Fix unportable use of getnameinfo() in pg_hba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) rather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11:

pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.

2020-11-02 Thread Tom Lane
Fix unportable use of getnameinfo() in pg_hba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) rather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11:

pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.

2020-11-02 Thread Tom Lane
Fix unportable use of getnameinfo() in pg_hba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) rather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11:

pgsql: Fix unportable use of getnameinfo() in pg_hba_file_rules view.

2020-11-02 Thread Tom Lane
Fix unportable use of getnameinfo() in pg_hba_file_rules view. fill_hba_line() thought it could get away with passing sizeof(struct sockaddr_storage) rather than the actual addrlen previously returned by getaddrinfo(). While that appears to work on many platforms, it does not work on FreeBSD 11:

pgsql: Remove special checks for pg_rewrite.ev_qual and ev_action being

2020-11-02 Thread Tom Lane
Remove special checks for pg_rewrite.ev_qual and ev_action being NULL. make_ruledef() and make_viewdef() were coded to cope with possible null-ness of these columns, but they've been marked BKI_FORCE_NOT_NULL for some time. So there's not really any need to do more than what we do for the other c

pgsql: Rethink the generation rule for fmgroids.h macros.

2020-11-02 Thread Tom Lane
Rethink the generation rule for fmgroids.h macros. Traditionally, the names of fmgroids.h macros for pg_proc OIDs have been constructed from the prosrc field. But sometimes the same C function underlies multiple pg_proc entries, forcing us to make an arbitrary choice of which OID to reference; th

pgsql: Second thoughts on TOAST decompression.

2020-11-02 Thread Tom Lane
Second thoughts on TOAST decompression. On detecting a corrupted match tag, pglz_decompress() should just summarily return -1. Breaking out of the loop, as I did in dfc797730, doesn't quite guarantee that will happen. Also, we can use unlikely() on that check, just in case it helps. Backpatch t

pgsql: Second thoughts on TOAST decompression.

2020-11-02 Thread Tom Lane
Second thoughts on TOAST decompression. On detecting a corrupted match tag, pglz_decompress() should just summarily return -1. Breaking out of the loop, as I did in dfc797730, doesn't quite guarantee that will happen. Also, we can use unlikely() on that check, just in case it helps. Backpatch t

pgsql: Use PG_GETARG_TRANSACTIONID where appropriate

2020-11-02 Thread Peter Eisentraut
Use PG_GETARG_TRANSACTIONID where appropriate Some places were using PG_GETARG_UINT32 where PG_GETARG_TRANSACTIONID would be more appropriate. (Of course, they are the same internally, so there is no externally visible effect.) To do that, export PG_GETARG_TRANSACTIONID outside of xid.c. We als

pgsql: Add missing comma in list of SSL versions

2020-11-02 Thread Magnus Hagander
Add missing comma in list of SSL versions Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/5ba4987a4048f1ad3002bc047279cb633429d7d1 Modified Files -- doc/src/sgml/sslinfo.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add missing comma in list of SSL versions

2020-11-02 Thread Magnus Hagander
Add missing comma in list of SSL versions Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fc5b2203bfe80a4ac1b3c2c3ff536247514df304 Modified Files -- doc/src/sgml/sslinfo.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add missing comma in list of SSL versions

2020-11-02 Thread Magnus Hagander
Add missing comma in list of SSL versions Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/57fae192f8f7d094159c913f10fcfd11cd827332 Modified Files -- doc/src/sgml/sslinfo.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add missing comma in list of SSL versions

2020-11-02 Thread Magnus Hagander
Add missing comma in list of SSL versions Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/06801aef52f7f734a737cc0763a410fd1ec6e574 Modified Files -- doc/src/sgml/sslinfo.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Clarify temporary table name shadowing in CREATE TABLE docs

2020-11-02 Thread Magnus Hagander
Clarify temporary table name shadowing in CREATE TABLE docs Author: David Johnston Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5b3dca096f8e504b73812f68716fb68dd1176d6d Modified Files -- doc/src/sgml/ref/create_table.sgml | 5 +++-- 1 file changed, 3

pgsql: Track collation versions for indexes.

2020-11-02 Thread Thomas Munro
Track collation versions for indexes. Record the current version of dependent collations in pg_depend when creating or rebuilding an index. When accessing the index later, warn that the index may be corrupted if the current version doesn't match. Thanks to Douglas Doole, Peter Eisentraut, Christ

pgsql: Add pg_depend.refobjversion.

2020-11-02 Thread Thomas Munro
Add pg_depend.refobjversion. Provide a place for the version of referenced database objects to be recorded. A follow-up commit will use this to record dependencies on collation versions for indexes, but similar ideas for other kinds of objects have also been mooted. Author: Thomas Munro Reviewe

pgsql: Remove pg_collation.collversion.

2020-11-02 Thread Thomas Munro
Remove pg_collation.collversion. This model couldn't be extended to cover the default collation, and didn't have any information about the affected database objects when the version changed. Remove, in preparation for a follow-up commit that will add a new mechanism. Author: Thomas Munro Review

pgsql: doc: Mention UNION/ORDER BY etc. keywords in section headers.

2020-11-02 Thread Heikki Linnakangas
doc: Mention UNION/ORDER BY etc. keywords in section headers. Most of the section and sub-section headers in the Queries chapter have the keywords literally stated, but neither "Sorting Rows" nor "Combining Rows" did. There's no rule that they must be, but it seems like a good practice. The keywor