Created
January 3, 2020 15:41
-
-
Save realsby/463f5aecf100769ec11c393ebfeecdb1 to your computer and use it in GitHub Desktop.
Upgrade Postgresql 9.4 to 9.6 on Debian 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nano /etc/apt/sources.list | |
deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo aptitude install postgresql-9.6 | |
pg_lsclusters | |
sudo pg_dropcluster 9.6 main --stop | |
pg_lsclusters | |
sudo service postgresql status | |
sudo service postgresql stop | |
sudo pg_upgradecluster 9.4 main | |
sudo service postgresql start | |
check if the db is working then: | |
sudo pg_dropcluster --stop 9.4 main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
select col.table_schema,
col.table_name,
col.ordinal_position as col_id,
col.column_name,
col.data_type,
col.numeric_precision,
col.numeric_scale
from information_schema.columns col
join information_schema.tables tab on tab.table_schema = col.table_schema
and tab.table_name = col.table_name
and tab.table_type = 'BASE TABLE'
where col.data_type LIKE '%json%'
and col.table_schema not in ('information_schema', 'pg_catalog')
order by col.table_schema,
col.table_name,
col.ordinal_position;