Overview of triggers extended with function name and arguments.

Did a lot of refactoring on the catalog to keep things clean.
This commit is contained in:
eelke 2018-11-18 19:30:45 +01:00
parent 35813ae926
commit fcb191f2cc
44 changed files with 797 additions and 404 deletions

View file

@ -13,12 +13,10 @@ std::string PgProcContainer::getLoadQuery() const
"proisstrict,proretset,provolatile,pronargs,pronargdefaults,prorettype,"
"proargtypes,proallargtypes,proargmodes,proargnames,proargdefaults,"
"prosrc,probin,proconfig,proacl";
auto cat = m_catalogue.lock();
int ver = cat->serverVersion();
if (ver >= 90500) {
if (minimumVersion(90500)) {
column_list += ",protrftypes";
}
else if (cat->serverVersion() >= 90600) {
if (minimumVersion(90600)) {
column_list += ",proparallel";
}
@ -28,24 +26,25 @@ std::string PgProcContainer::getLoadQuery() const
PgProc PgProcContainer::loadElem(const Pgsql::Row &row)
{
Pgsql::Col col(row);
PgProc v;
col >> v.oid >> v.proname >> v.pronamespace >> v.proowner >> v.prolang >> v.procost >> v.prorows
>> v.provariadic >> v.protransform >> v.proisagg >> v.proiswindow >> v.prosecdef >> v.proleakproof
>> v.proisstrict >> v.proretset >> v.provolatile >> v.pronargs >> v.pronargdefaults
>> v.prorettype;
col.getAsVector<Oid>(std::back_inserter(v.proargtypes));
col >> v.proallargtypes >> v.proargmodes >> v.proargnames
>> v.proargdefaults;
col >> v.prosrc;
col >> v.probin >> v.proconfig >> v.proacl;
PgProc v(m_catalog);
Oid namespace_oid;
col >> v.oid >> v.name >> namespace_oid >> v.owner >> v.lang >> v.cost >> v.rows
>> v.variadic >> v.transform >> v.isagg >> v.iswindow >> v.secdef >> v.leakproof
>> v.isstrict >> v.retset >> v.provolatile >> v.nargs >> v.nargdefaults
>> v.rettype;
col.getAsVector<Oid>(std::back_inserter(v.argtypes));
col >> v.allargtypes >> v.argmodes >> v.argnames
>> v.argdefaults;
col >> v.src;
col >> v.bin >> v.config >> v.acl;
auto cat = m_catalogue.lock();
int ver = cat->serverVersion();
if (ver >= 90500) {
col >> v.protrftypes;
v.setSchemaOid(namespace_oid);
if (minimumVersion(90500)) {
col >> v.trftypes;
}
else if (cat->serverVersion() >= 90600) {
col >> v.proparallel;
if (minimumVersion(90600)) {
col >> v.parallel;
}
return v;