0

I'm attempting an operation on a pg_class c, but getting this:

ERROR:  function pg_indexes_size(oid) does not exist
LINE 10:               , pg_indexes_size(c.oid) AS index_bytes
                         ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Version of Postgres

$ psql --version
psql (PostgreSQL) 8.4.20
contains support for command-line editing

I tried typecasting to a few different types, but with no success.

3

8.4 is a pretty ancient version now. The function you are after is not mentioned in the docs, therefore it is sane to think it simply did not exist back then. 9.0 introduced a number of administration functions, and pg_indexes_size() is one of those.

In any case, it would be prudent to upgrade to a supported version (9.2+ at the time of writing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.