Added pg_proc table to the catalog. Contains the definition of functions.
Also improved the loading code for some catalog tables.
This commit is contained in:
parent
d8fc14c823
commit
35813ae926
10 changed files with 152 additions and 17 deletions
48
pglablib/PgProc.h
Normal file
48
pglablib/PgProc.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef PGPROC_H
|
||||
#define PGPROC_H
|
||||
|
||||
#include <QString>
|
||||
#include <libpq-fe.h>
|
||||
#include "Pgsql_Value.h"
|
||||
|
||||
class PgProc {
|
||||
public:
|
||||
Oid oid = InvalidOid; // oid
|
||||
QString proname; // name
|
||||
Oid pronamespace = InvalidOid; // oid
|
||||
Oid proowner = InvalidOid; // oid
|
||||
Oid prolang = InvalidOid; // oid
|
||||
float procost = 0.f; // float4
|
||||
float prorows = 0.f; // float4
|
||||
Oid provariadic = InvalidOid; // oid
|
||||
QString protransform; // regproc
|
||||
bool proisagg = false; // bool
|
||||
bool proiswindow = false; // bool
|
||||
bool prosecdef = false; // bool
|
||||
bool proleakproof = false; // bool
|
||||
bool proisstrict = false; // bool
|
||||
bool proretset = false; // bool
|
||||
char provolatile = '\0'; // char
|
||||
char proparallel = '\0'; // char, version >= 9.6
|
||||
int16_t pronargs = 0; // int2
|
||||
int16_t pronargdefaults = 0; // int2
|
||||
Oid prorettype = InvalidOid; // oid
|
||||
std::vector<Oid> proargtypes; // oid[]
|
||||
std::vector<Oid> proallargtypes; // oid[]
|
||||
std::vector<char> proargmodes; // char[]
|
||||
std::vector<QString> proargnames; // text[]
|
||||
std::optional<QString> proargdefaults; // pg_node_tree
|
||||
std::vector<Oid> protrftypes; // oid[], version >= 9.5
|
||||
QString prosrc; // text
|
||||
QString probin; // text
|
||||
std::vector<QString> proconfig; // text[]
|
||||
std::vector<QString> proacl; // aclitem[]
|
||||
|
||||
bool operator==(Oid _oid) const { return oid == _oid; }
|
||||
bool operator==(const QString &n) const { return proname == n; }
|
||||
bool operator<(Oid _oid) const { return oid < _oid; }
|
||||
bool operator<(const PgProc &rhs) const { return oid < rhs.oid; }
|
||||
|
||||
};
|
||||
|
||||
#endif // PGPROC_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue