1

Background: using postgres 11 on RDS, interface is psql on a Centos 7 box; objective is to show the source of certain stored procs / functions so that I can work with them

Problem description : When I attempt to list / show the source of a given stored function using the \df+ command which I understand to be correct for this use based on [official docs here](https://www.postgresql.org/docs/current/app-psql.html], an error is given as shown:

psql=> \df+ schema_foo.proc_bar;
ERROR:  column p.proisagg does not exist
LINE 6:   WHEN p.proisagg THEN 'agg'

I have no clue how to interpret this; the function in question does not contain the snippet of logic shown in the error, nor the column referenced there p.proisagg. I have verified this by opening the function in vim with \ef.

My guess based on several unrelated github issues that mention this same error for example is that it is in reference to some schema code internal to postgres.

Summary: in short, I can view the source of the functions using \ef, so my work is not impaired from a practical standpoint, however I wish to understand this error and why I'm encountering it with \df+.

Mister October
  • 165
  • 1
  • 9
  • 3
    you are using an outdated `psql` version against a newer Postgres (server) version –  Dec 02 '19 at 18:45
  • Nailed it! Thanks a bunch @a_horse_with_no_name . This led me to another mini-difficulty of not being able to figure out how to get psql to run as version 11 [which is installed on the centos box as well as rds, but the psql symlink was out of date for some reason and wouldn't update manually via ln ] -- solved with answers here : https://stackoverflow.com/questions/34052046/how-do-i-correct-the-mismatch-of-psql-version-and-postgresql-version – Mister October Dec 02 '19 at 21:14

1 Answers1

1

I had the same issue and ran these 2 commands to fix it

sed -i "s/NOT pp.proisagg/pp.prokind='f'/g" /usr/share/phpPgAdmin/classes/database/Postgres.php
sed -i "s/NOT p.proisagg/p.prokind='f'/g" /usr/share/phpPgAdmin/classes/database/Postgres.php
Sachin
  • 353
  • 1
  • 10