Added checks on row and column indexes in Pgsql::Result to detect these kind of problems earlier in the future.
25 lines
858 B
C++
25 lines
858 B
C++
#include "PgClassContainer.h"
|
|
#include "Pgsql_Connection.h"
|
|
#include "Pgsql_Col.h"
|
|
|
|
std::string PgClassContainer::getLoadQuery() const
|
|
{
|
|
return "SELECT oid, relname, relnamespace, reltype, reloftype, "
|
|
" relowner, relam, relfilenode, reltablespace, relpages, "
|
|
" reltuples, reltoastrelid, relisshared, relpersistence, "
|
|
" relkind, relhasoids, relispopulated, relfrozenxid, relminmxid, "
|
|
" relacl, reloptions \n"
|
|
"FROM pg_catalog.pg_class";
|
|
}
|
|
|
|
PgClass PgClassContainer::loadElem(const Pgsql::Row &row)
|
|
{
|
|
Pgsql::Col col(row);
|
|
PgClass v;
|
|
col >> v.oid >> v.name >> v.relnamespace >> v.type >> v.oftype
|
|
>> v.owner >> v.am >> v.filenode >> v.tablespace >> v.pages_est
|
|
>> v.tuples_est >> v.toastrelid >> v.isshared >> v.persistence
|
|
>> v.kind >> v.hasoids >> v.ispopulated >> v.frozenxid >> v.minmxid
|
|
>> v.acl >> v.options;
|
|
return v;
|
|
}
|