Skip to content
Custom PostgreSQL functions and extensions
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
global_search Add global_regexp_search() as a variant of global_search(). Jun 11, 2018
hamming_weight Initial commit Mar 12, 2018
large_objects Add lo_digest function in large_objects Mar 17, 2018
.gitignore Add LICENCE and README Mar 12, 2018 Add dict_maxlen, a text search dictionary to filter out long tokens. Mar 10, 2019

PostgreSQL functions

A repository of custom PostgreSQL functions and extensions.


A simple plpgsql function that takes two table names (through the regclass type), builds a query comparing their contents, runs it, and returns a set of diff-like results with the rows that differ. It does not require a primary key on tables to compare.


Return a CURSOR pointing to pivoted results of a query passed as the 1st parameter, with sorted headers passed as a query as the 2nd parameter.
See for a lot of context about this function.

global_search / global_regexp_search

Two plpgsql functions that find occurrences of a string or a regular expression in all or some of the tables of an entire database. It returns the table, column and ctid of the rows containing the value, and the value itself in the case of a regexp search. The search can be limited to an array of tables and/or of schemas. Progress is optionally reported by emitting raise info messages.


C functions that return the number of bits set to 1 in a bytea, int or bigint value.



A plpgsql function that returns the size of a given large object.


A plperlu function that returns the digest (hash output) of a large object for any hash supported by perl's Digest module.


A text search dictionary to filter out tokens longer than a given length.

You can’t perform that action at this time.