How to install postgresql on deepin

$ sudo apt-get install curl ca-certificates gnupg #Install curl 、ca-certificates、gnupg

$ curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - #Download the installation source public key

$ sudo deepin-editor /etc/apt/sources.list.d/pgdg.list #Enter the following command to create the file /etc/apt/sources.list.d/pgdg.list and open it for editing

Copy and paste the following into the /etc/apt/sources.list.d/pgdg.list file and save it.
$ deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main

$ sudo apt-get update #update local repo

$ sudo apt-get install postgresql #Install the lasted postgresql

If you installed an old version before, just ln the pgdump and pgdumpall to the /usr/bin/ folder.