pgsql: Doc: Improve description of connection strings with Percent-enco

2020-01-19 Thread Michael Paquier
Doc: Improve description of connection strings with Percent-encoding Clarify the description related to the use of characters which can be encoded, and add an example. Author: Jobin Augustine Reviewed-by: Peter Eisentraut, Alvaro Herrera, Heikki Linnakangas, Michael Paquier, Alex Shulgin Discussi

pgsql: Remove separate files for the initial contents of pg_(sh)descrip

2020-01-19 Thread Heikki Linnakangas
Remove separate files for the initial contents of pg_(sh)description This data was only in separate files because it was the most convenient way to handle it with a shell script. Now that we use a general-purpose programming language, it's easy to assemble the data into the same format as the rest

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread David Fetter
On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: > Andrew Dunstan writes: > >> On Jan 17, 2020, at 12:44 PM, Tom Lane wrote: > >>> Shoulda been a catversion bump in here, if only for protocol's sake. > > > I'd love to have a git pre-commit hook that would warn about this, it > > seems t

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Tom Lane
David Fetter writes: > On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: >> I'd be okay with a hook that there was a way to override ("yes, >> I know what I'm doing, this doesn't require a catversion change"). >> But there's no way to do that is there? > I'm pretty sure there is. The prog

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread David Fetter
On Sun, Jan 19, 2020 at 12:46:19PM -0500, Tom Lane wrote: > David Fetter writes: > > On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: > >> I'd be okay with a hook that there was a way to override ("yes, > >> I know what I'm doing, this doesn't require a catversion change"). > >> But there

pgsql: Silence minor compiler warnings.

2020-01-19 Thread Tom Lane
Silence minor compiler warnings. Ensure that ClassifyUtilityCommandAsReadOnly() has defined behavior even if TransactionStmt.kind has a value that's not one of the declared values for its enum. Suppress warnings from compilers that don't know that elog(ERROR) doesn't return, in ClassifyUtilityCom

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Mark Dilger
> On Jan 19, 2020, at 12:20 PM, David Fetter wrote: > > On Sun, Jan 19, 2020 at 12:46:19PM -0500, Tom Lane wrote: >> David Fetter writes: >>> On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: I'd be okay with a hook that there was a way to override ("yes, I know what I'm doi

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Tom Lane
Mark Dilger writes: > On Jan 19, 2020, at 12:20 PM, David Fetter wrote: >> On Sun, Jan 19, 2020 at 12:46:19PM -0500, Tom Lane wrote: >>> I think you are right that individual committers could set up such hooks >>> in their own private repos. But that's not what was being suggested, >>> or so I t

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Andrew Dunstan
On Mon, Jan 20, 2020 at 4:16 AM Tom Lane wrote: > > David Fetter writes: > > On Fri, Jan 17, 2020 at 06:41:02PM -0500, Tom Lane wrote: > >> I'd be okay with a hook that there was a way to override ("yes, > >> I know what I'm doing, this doesn't require a catversion change"). > >> But there's no w

pgsql: Fix out-of-memory handling in ecpglib.

2020-01-19 Thread Tom Lane
Fix out-of-memory handling in ecpglib. ecpg_build_params() would crash on a null pointer dereference if realloc() failed, due to updating the persistent "stmt" struct too aggressively. (Even without the crash, this would've leaked the old storage that we were trying to realloc.) Per Coverity. T

pgsql: Fix out-of-memory handling in ecpglib.

2020-01-19 Thread Tom Lane
Fix out-of-memory handling in ecpglib. ecpg_build_params() would crash on a null pointer dereference if realloc() failed, due to updating the persistent "stmt" struct too aggressively. (Even without the crash, this would've leaked the old storage that we were trying to realloc.) Per Coverity. T

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Tom Lane
Andrew Dunstan writes: > On Mon, Jan 20, 2020 at 4:16 AM Tom Lane wrote: >> I think you are right that individual committers could set up such hooks >> in their own private repos. But that's not what was being suggested, >> or so I thought. > I was really thinking of a client side hook. The rea

pgsql: Allow vacuum command to process indexes in parallel.

2020-01-19 Thread Amit Kapila
Allow vacuum command to process indexes in parallel. This feature allows the vacuum to leverage multiple CPUs in order to process indexes. This enables us to perform index vacuuming and index cleanup with background workers. This adds a PARALLEL option to VACUUM command where the user can specif