Home > Software design >  postgres pg_column_compression is giving error: No function matches the given name and argument type
postgres pg_column_compression is giving error: No function matches the given name and argument type

Time:12-27

My Postgres DB version is 13.5.

When I run -

SELECT  pg_column_size(jdoc) FROM dataingest.refresh limit 10;

I am getting result as expected.

pg_column_size|
-------------- 
          2523|
          2530|

But when I run -

SELECT  pg_column_compression(jdoc) FROM dataingest.refresh limit 2;

I am facing below error.

SQL Error [42883]: ERROR: function pg_column_compression(jsonb) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts.

What could be issue and how to fix it.

CodePudding user response:

pg_column_compression was introduced in Postgres 14, so it's not available in Postgres 13 which is the version you are using.

The only way to "fix" this is to upgrade to Postgres 14 or 15

  • Related