pgsql: Change get_constraint_index() to use pg_constraint.conindid

2020-12-09 Thread Peter Eisentraut
Change get_constraint_index() to use pg_constraint.conindid It was still using a scan of pg_depend instead of using the conindid column that has been added since. Since it is now just a catalog lookup wrapper and not related to pg_depend, move from pg_depend.c to lsyscache.c. Reviewed-by: Matthi

pgsql: Support subscripting of arbitrary types, not only arrays.

2020-12-09 Thread Tom Lane
Support subscripting of arbitrary types, not only arrays. This patch generalizes the subscripting infrastructure so that any data type can be subscripted, if it provides a handler function to define what that means. Traditional variable-length (varlena) arrays all use array_subscript_handler(), w

Re: pgsql: Support subscripting of arbitrary types, not only arrays.

2020-12-09 Thread Alexander Korotkov
On Wed, Dec 9, 2020 at 8:40 PM Tom Lane wrote: > Support subscripting of arbitrary types, not only arrays. Nice to see this committed! BTW, it seems typedefs.list needs to be adjusted. -- Regards, Alexander Korotkov generic_subsciption_typedefs.patch Description: Binary data

pgsql: Refactor MD5 implementations according to new cryptohash infrast

2020-12-09 Thread Michael Paquier
Refactor MD5 implementations according to new cryptohash infrastructure This commit heavily reorganizes the MD5 implementations that exist in the tree in various aspects. First, MD5 is added to the list of options available in cryptohash.c and cryptohash_openssl.c. This means that if building wi

Re: pgsql: Support subscripting of arbitrary types, not only arrays.

2020-12-09 Thread Tom Lane
Alexander Korotkov writes: > BTW, it seems typedefs.list needs to be adjusted. There's no particular consensus so far that typedefs.list should be maintained on-the-fly. Checking the version in git against what the buildfarm is reporting shows a *lot* of diffs besides this, so I'm hardly the onl

Re: pgsql: Refactor MD5 implementations according to new cryptohash infrast

2020-12-09 Thread Michael Paquier
On Thu, Dec 10, 2020 at 03:01:20AM +, Michael Paquier wrote: > Refactor MD5 implementations according to new cryptohash infrastructure > > This commit heavily reorganizes the MD5 implementations that exist in > the tree in various aspects. > > First, MD5 is added to the list of options availa

pgsql: Fix compilation of uuid-ossp

2020-12-09 Thread Michael Paquier
Fix compilation of uuid-ossp This module had a dependency on pgcrypto's md5.c that got removed by b67b57a. Instead of the code from pgcrypto, this code can just use the new cryptohash routines for MD5 as a drop-in replacement, so let's just do this switch. This has also the merit to simplify a b

Re: pgsql: Refactor MD5 implementations according to new cryptohash infrast

2020-12-09 Thread Michael Paquier
On Thu, Dec 10, 2020 at 12:18:57PM +0900, Michael Paquier wrote: > And this has broken uuid-ossp. The switch is quite easy to do as this > module just needs to use cryptohash APIs for MD5. Will fix in a > minute.. So, I have reproduced the failure with --with-uuid=e2fs and now fixed it with 525e