Code Monkey home page Code Monkey logo

postgresql-functions's Introduction

PostgreSQL functions

A repository of custom PostgreSQL functions and extensions.

diff_tables

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.

dynamic_pivot

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 https://postgresql.verite.pro/blog/2018/06/19/crosstab-pivot.html for a lot of context about this function.

global_search / global_match

Two plpgsql functions that find occurrences of a string or more generally any kind of text-based matching 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 global_match. The search can be limited to an array of tables and/or of schemas. Progress is optionally reported by emitting raise info messages.

hamming_weight

C functions that return the number of bits set to 1 in a bytea, int or bigint value. The bytea variant is available as a built-in function (named bit_count) since PostgreSQL 14.

large_objects

lo_size

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

lo_digest

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

strings/parse_option

A simple function to parse name=value settings.

strings/plperl/multi_replace

Replace strings by other strings within a larger text, with Perl s// operator, in a single pass. Each string in the first array is replaced by the element at the same index in the second array.

tsearch/dict_maxlen

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

psql-cli

psqlrc declarations, companion scripts, tricks for the psql command-line interpreter.

postgresql-functions's People

Contributors

dverite avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.