While starting the postgress getting some errors, below is the log:
2019-10-11 11:30:15.885 UTC [1] LOG: database system is ready to accept connections
2019-10-11 11:32:01.932 UTC [36] ERROR: column d.adsrc does not exist at character 79
2019-10-11 11:32:01.932 UTC [36] STATEMENT: SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, (a.attidentity = 'd')::int AS identity
FROM pg_class c
JOIN pg_namespace n ON c.relnamespace = n.oid
JOIN pg_attribute a ON c.oid = a.attrelid
LEFT JOIN pg_attrdef d ON c.oid = d.adrelid AND a.attnum = d.adnum
WHERE c.relname = 'admins'
AND n.nspname = current_schema()
AND NOT a.attisdropped
AND a.attnum > 0
ORDER BY a.attnum
Can you give all the commands you ran and any relevant contextual information or files for reproducing the issue
Did you give it a data set or script to run and it gives you this error?
Just for information Postgresql 11 is the last version where "adsrc" is present.
See https://www.postgresql.org/docs/11/catalog-pg-attrdef.html and compare with https://www.postgresql.org/docs/12/catalog-pg-attrdef.html
From Version 8, there's this quotation:
"The adsrc field is historical, and is best not used, because it does not track outside changes that might affect the representation of the default value. Reverse-compiling the adbin field (with pg_get_expr for example) is a better way to display the default value."
In the docker file I was using the parameter image:postgres, and unfortunately I had to delete the docker image from system and re build the containers. That's when I started to face this issue. Also I'm mounting volumes. Volume variable has old data structure and the postgres 12 doesn't have this variable. Will deleting the volume variable, solve the issue?
Yeah from the release notes it looks like there's no more adsrc field in Postgres 12
Remove obsolete pg_attrdef.adsrc column (Peter Eisentraut)
https://www.postgresql.org/docs/11/catalog-pg-attrdef.html
compared to:
https://www.postgresql.org/docs/12/catalog-pg-attrdef.html
Going to close since this isn't an issue with the image, you might also find this thread helpful https://github.com/dbcli/pgcli/issues/1058
If you have further questions you could try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow
Most helpful comment
Just for information Postgresql 11 is the last version where "adsrc" is present.
See https://www.postgresql.org/docs/11/catalog-pg-attrdef.html and compare with https://www.postgresql.org/docs/12/catalog-pg-attrdef.html
From Version 8, there's this quotation:
"The adsrc field is historical, and is best not used, because it does not track outside changes that might affect the representation of the default value. Reverse-compiling the adbin field (with pg_get_expr for example) is a better way to display the default value."