Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

2019-03-17 Thread Alexander Korotkov
On Mon, Mar 18, 2019 at 7:12 AM Michael Paquier wrote: > > On Sun, Mar 17, 2019 at 03:09:07PM +0300, Alexander Korotkov wrote: > > Anyway, I thought about this as about just beautification. If it's > > bad idea, let's revert this. > > I agree with Peter's point here that having {0} as initial sta

pgsql: Revert 4178d8b91c

2019-03-17 Thread Alexander Korotkov
Revert 4178d8b91c As it was agreed to worsen the code readability. Discussion: https://postgr.es/m/ecfcfb5f-3233-eaa9-0c83-07056fb49a83%402ndquadrant.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a0478b69985056965a5737184279a99bde421f69 Modified Files -

Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

2019-03-17 Thread Michael Paquier
On Sun, Mar 17, 2019 at 03:09:07PM +0300, Alexander Korotkov wrote: > Anyway, I thought about this as about just beautification. If it's > bad idea, let's revert this. I agree with Peter's point here that having {0} as initial state is cleaner instead of adding an extra level of abstraction. -- M

pgsql: Refactor more code logic to update the control file

2019-03-17 Thread Michael Paquier
Refactor more code logic to update the control file ce6afc6 has begun the refactoring work by plugging pg_rewind into a central routine to update the control file, and left around two extra copies, with one in xlog.c for the backend and one in pg_resetwal.c. By adding an extra option to the centr

pgsql: Fix pg_rewind when rewinding new database with tables included

2019-03-17 Thread Michael Paquier
Fix pg_rewind when rewinding new database with tables included This fixes an issue introduced by 266b6ac, which has added filters to exclude file patterns on the target and source data directories to reduce the number of files transferred. Filters get applied to both the target and source data fi

pgsql: Fix pg_rewind when rewinding new database with tables included

2019-03-17 Thread Michael Paquier
Fix pg_rewind when rewinding new database with tables included This fixes an issue introduced by 266b6ac, which has added filters to exclude file patterns on the target and source data directories to reduce the number of files transferred. Filters get applied to both the target and source data fi

pgsql: Error out in pg_verify_checksums on incompatible block size

2019-03-17 Thread Michael Paquier
Error out in pg_verify_checksums on incompatible block size pg_verify_checksums is compiled with a given block size and has a hard dependency to it per the way checksums are calculated via checksum_impl.h, and trying to use the tool on a data folder which has not the same block size would result i

pgsql: Error out in pg_checksums on incompatible block size

2019-03-17 Thread Michael Paquier
Error out in pg_checksums on incompatible block size pg_checksums is compiled with a given block size and has a hard dependency to it per the way checksums are calculated via checksum_impl.h, and trying to use the tool on a data folder which has not the same block size would result in incorrect ch

Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

2019-03-17 Thread Alexander Korotkov
On Sun, Mar 17, 2019 at 3:00 PM Peter Eisentraut wrote: > On 2019-03-17 10:59, Alexander Korotkov wrote: > > Beautify initialization of JsonValueList and JsonLikeRegexContext > > > > Instead of tricky assignment to {0} introduce special macros, which > > explicitly initialize every field. > > To m

Re: pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

2019-03-17 Thread Peter Eisentraut
On 2019-03-17 10:59, Alexander Korotkov wrote: > Beautify initialization of JsonValueList and JsonLikeRegexContext > > Instead of tricky assignment to {0} introduce special macros, which > explicitly initialize every field. To me, this patch is exactly the opposite of what I'd do to "beautify ini

pgsql: Beautify initialization of JsonValueList and JsonLikeRegexContex

2019-03-17 Thread Alexander Korotkov
Beautify initialization of JsonValueList and JsonLikeRegexContext Instead of tricky assignment to {0} introduce special macros, which explicitly initialize every field. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4178d8b91cb943b422d1837b4b7798576d88995a Modifie

pgsql: Apply const qualifier to keywords of jsonpath_scan.l

2019-03-17 Thread Alexander Korotkov
Apply const qualifier to keywords of jsonpath_scan.l Discussion: https://postgr.es/m/CAEeOP_a-Pfy%3DU9-f%3DgQ0AsB8FrxrC8xCTVq%2BeO71-2VoWP5cag%40mail.gmail.com Author: Mark G Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/aa1b7f386687dec17ffa62d13026580050734632

pgsql: Remove some make rules added in 142c400d72

2019-03-17 Thread Alexander Korotkov
Remove some make rules added in 142c400d72 Because they fail build of jsonpath_scan.c. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c183a07f279d1fba8ccea1baf7210e8fafbaa097 Modified Files -- src/backend/utils/adt/Makefile | 2 -- 1 file changed, 2 del

pgsql: Fix make rules for jsonpath grammar making them similar to SQL g

2019-03-17 Thread Alexander Korotkov
Fix make rules for jsonpath grammar making them similar to SQL grammar Reported-by: Jeff Janes, Tom Lane Discussion: https://postgr.es/m/CAMkU%3D1w1qBvoW82ZTFpAKae027R-2OHw-m6ALe0VQRNAFueBVA%40mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/142c400d7

pgsql: Add support for collation attributes on older ICU versions

2019-03-17 Thread Peter Eisentraut
Add support for collation attributes on older ICU versions Starting in ICU 54, collation customization attributes can be specified in the locale string, for example "@colStrength=primary;colCaseLevel=yes". Add support for this for older ICU versions as well, by adding some minimal parsing of the

pgsql: Fix compiler warning in jsonpath_exec.c

2019-03-17 Thread Alexander Korotkov
Fix compiler warning in jsonpath_exec.c Warning was observed in gcc 4.4.6, gcc 4.4.7 and probably others. Reported-by: Tom Lane Discussion: https://postgr.es/m/25151.1552751426%40sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/042162d6281a7daf1291931e