GithubHelp home page GithubHelp logo

rodo / cat_tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from decibel/cat_tools

0.0 1.0 0.0 47 KB

Tools for interfacing with Postgres catalog tables

License: MIT License

Makefile 12.68% Shell 27.05% PLpgSQL 60.27%

cat_tools's Introduction

Cat Tools

These are tools that make it easier to interface with the Postgres catalog tables/views/functions. They are meant for use by code, not by people.

To make use of them, you need to grant cat_tools__usage to any roles that need access.

Current Status

PGXN version Build Status

This is very much a work in progress. If it doesn’t do something you need, please open an issue!

Supported Versions

Works on Postgres 9.3 and above.

Functions

  • cat_tools.currval(table, column) - Returns current value for a sequence owned by a column

  • cat_tools.enum_range(regtype) - Returns valid values for an ENUM as an array

  • cat_tools.enum_range_srf(regtype) - Returns valid values for an ENUM as a recordset

  • cat_tools.name__check(text) - Throws an error if input would be truncated when cast to name

  • cat_tools.pg_class(relation regclass) - Returns cat_tools.pg_class_v row for a relation

  • cat_tools.trigger__parse(trigger oid) - Returns information about a trigger

  • cat_tools.trigger__get_oid(trigger_table, trigger_name) - oid of a trigger. Throws error if trigger doesn’t exits.

  • cat_tools.triggerget_oidloose(trigger_table, trigger_name) - oid of a trigger. Does not throw error if trigger doesn’t exits.

Views

Warning
These views may eventually move into a separate extension!
  • cat_tools.pg_class_v - Joins pg_class to pg_namespace

  • cat_tools.column - Returns data about columns

  • cat_tools.pg_all_foreign_keys - Data about foreign keys

PandaPost is released under a MIT liscense.

Copyright (c) 2016 Jim Nasby <[email protected]>.

cat_tools's People

Watchers

 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.