Show sizes
table, index, toast and total size per Table size of each index
This commit is contained in:
parent
d6aeef492d
commit
11459e1e12
17 changed files with 138 additions and 28 deletions
|
|
@ -47,7 +47,10 @@ Value::operator std::string() const
|
|||
|
||||
Value::operator int16_t() const
|
||||
{
|
||||
int32_t r = operator int32_t();
|
||||
if (m_val == nullptr)
|
||||
return 0;
|
||||
|
||||
int32_t r = operator int32_t();
|
||||
if (r <= std::numeric_limits<int16_t>::max()
|
||||
&& r >= std::numeric_limits<int16_t>::min())
|
||||
return int16_t(r);
|
||||
|
|
@ -57,7 +60,10 @@ Value::operator int16_t() const
|
|||
|
||||
Value::operator int32_t() const
|
||||
{
|
||||
const size_t len = std::strlen(m_val);
|
||||
if (m_val == nullptr)
|
||||
return 0;
|
||||
|
||||
const size_t len = std::strlen(m_val);
|
||||
if (len > 0) {
|
||||
char *endptr = nullptr;
|
||||
long result = std::strtol(m_val, &endptr, 10);
|
||||
|
|
@ -74,6 +80,9 @@ Value::operator Oid() const
|
|||
|
||||
Value::operator int64_t() const
|
||||
{
|
||||
if (m_val == nullptr)
|
||||
return 0LL;
|
||||
|
||||
const int len = std::strlen(m_val);
|
||||
if (len > 0) {
|
||||
char *endptr = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue