Code Monkey home page Code Monkey logo

plpgsql-tools's Introduction

Getting started

git clone https://github.com/luk4z7/plpgsql-tools.git

Execute the file init.sh and enter your name of database for deploy

https://github.com/luk4z7/plpgsql-tools for the canonical source repository
Helpers for PL/pgSQL applications

 ____  _        __           ____   ___  _
|  _ \| |      / / __   __ _/ ___| / _ \| |
| |_) | |     / / '_ \ / _` \___ \| | | | |
|  __/| |___ / /| |_) | (_| |___) | |_| | |___
|_|   |_____/_/ | .__/ \__, |____/ \__\_\_____|
                |_|    |___/

PostgreSQL
Enter the database name:

Then just connect to the database and run a query

SELECT * FROM helper_functions;
            function              |                                      description                                      |          parameters                                     |      return
----------------------------------+---------------------------------------------------------------------------------------+---------------------------------------------------------+-------------------
 pg_get_definition_tables_json()  | Return all metadata of tables in the specific schema                                  | {"schema CHARACTER VARYING"}                            | TEXT
 pg_search_table()                | Return all tables that match a name of table or column                                | {"keyword CHARACTER VARYING"}                           | CHARACTER VARYING
 pg_show_activity()               | Show activity of all users and transactions in all databases                          | {""}                                                    | TEXT
 pg_show_larger_object()          | Show size of all objects in database                                                  | {"size INTEGER (in bytes)"}                             | CHARACTER VARYING
 pg_show_size_databases()         | Show size of all databases                                                            | {""}                                                    | CHARACTER VARYING
 pg_show_tables_with_oid_lo()     | Show all tables with column type oid or lo                                            | {""}                                                    | CHARACTER VARYING
 pg_size_object()                 | Show information about object, size, entries, type, pages                             | {"objectName TEXT"}                                     | CHARACTER VARYING
 pg_terminate_backend()           | Terminate processes by status                                                         | {"status CHARACTER VARYING"}                            | BOOLEAN
 pg_terminate_backend_all()       | Terminate all processes except the that executing the function                        | {""}                                                    | BOOLEAN
 pg_truncate_larger_tables()      | Truncate all data of large tables, WARNING, don't execute this function in production | {"size INTEGER (in bytes)"}                             | BOOLEAN
 pg_truncate_tables_with_search() | Truncate all tables with ilike, WARNING, don't execute this function in production    | {"schema TEXT","key for search TEXT","preview BOOLEAN"} | VOID

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.