pgsql: Remove byte-masking macros for Datum conversion macros

2018-01-26 Thread Peter Eisentraut
Remove byte-masking macros for Datum conversion macros As the comment there stated, these were needed for old-style user-defined functions, but since we removed support for those, we don't need this anymore. Reviewed-by: Michael Paquier Branch -- master Details --- https://git.postgres

pgsql: Use abstracted SSL API in server connection log messages

2018-01-26 Thread Peter Eisentraut
Use abstracted SSL API in server connection log messages The existing "connection authorized" server log messages used OpenSSL API calls directly, even though similar abstracted API calls exist. Change to use the latter instead. Change the function prototype for the functions that return the TLS

pgsql: pageinspect: Fix use of wrong memory context by hash_page_items.

2018-01-26 Thread Robert Haas
pageinspect: Fix use of wrong memory context by hash_page_items. This can cause it to produce incorrect output. Report and patch by Masahiko Sawada. Discussion: http://postgr.es/m/CAD21AoBc5Asx7pXdUWu6NqU_g=ysn95egl9smeyhllduyoo...@mail.gmail.com Branch -- REL_10_STABLE Details --- ht

pgsql: pageinspect: Fix use of wrong memory context by hash_page_items.

2018-01-26 Thread Robert Haas
pageinspect: Fix use of wrong memory context by hash_page_items. This can cause it to produce incorrect output. Report and patch by Masahiko Sawada. Discussion: http://postgr.es/m/CAD21AoBc5Asx7pXdUWu6NqU_g=ysn95egl9smeyhllduyoo...@mail.gmail.com Branch -- master Details --- https://g

pgsql: Remove the obsolete WITH clause of CREATE FUNCTION.

2018-01-26 Thread Tom Lane
Remove the obsolete WITH clause of CREATE FUNCTION. This clause was superseded by SQL-standard syntax back in 7.3. We've kept it around for backwards-compatibility purposes ever since; but 15 years seems like long enough for that, especially seeing that there are undocumented weirdnesses in how it

pgsql: Factor some code out of create_grouping_paths.

2018-01-26 Thread Robert Haas
Factor some code out of create_grouping_paths. This is preparatory refactoring to prepare the way for partition-wise aggregate, which will reuse the new subroutines for child grouping rels. It also does not seem like a bad idea on general principle, as the function was getting pretty long. Jeeva

pgsql: Avoid unnecessary use of pg_strcasecmp for already-downcased ide

2018-01-26 Thread Tom Lane
Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. We have a lot of code in which option names, which from the user's viewpoint are logically keywords, are passed through the grammar as plain identifiers, and then matched to string literals during command execution. This app