pgsql: Add exclusion to headercheck

2020-01-24 Thread Peter Eisentraut
Add exclusion to headercheck src/include/common/unicode_combining_table.h is currently not meant to be included standalone. Things could be refactored to allow it, but that would be beyond the present purpose. So adding an exclusion here seems best. Discussion: https://www.postgresql.org/messag

pgsql: Fix typo

2020-01-24 Thread Peter Eisentraut
Fix typo Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a7a848844d74e63ee102717972de3e60b5f4549a Modified Files -- doc/src/sgml/ref/drop_foreign_table.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Add pg_file_sync() to adminpack extension.

2020-01-24 Thread Fujii Masao
Add pg_file_sync() to adminpack extension. This function allows us to fsync the specified file or directory. It's useful, for example, when we want to sync the file that pg_file_write() writes out or that COPY TO exports the data into, for durability. Author: Fujii Masao Reviewed-By: Julien Rouha

pgsql: Adjust src/include/utils/jsonapi.h so it's not backend-only.

2020-01-24 Thread Robert Haas
Adjust src/include/utils/jsonapi.h so it's not backend-only. The major change here is that we no longer include jsonb.h into jsonapi.h. The reason that was necessary is that jsonapi.h included several prototypes functions in jsonfuncs.c that depend on the Jsonb type. Move those prototypes to a new

pgsql: Split JSON lexer/parser from 'json' data type support.

2020-01-24 Thread Robert Haas
Split JSON lexer/parser from 'json' data type support. Keep the code that pertains to the 'json' data type in json.c, but move the lexing and parsing code to a new file jsonapi.c, a name I chose because the corresponding prototypes are in jsonapi.h. This seems like a logical division, because the

pgsql: Remove jsonapi.c's lex_accept().

2020-01-24 Thread Robert Haas
Remove jsonapi.c's lex_accept(). At first glance, this function seems useful, but it actually increases the amount of code required rather than decreasing it. Inline the logic into the callers instead; most callers don't use the 'lexeme' argument for anything and as a result considerable simplific