Yes, it’s possible! Recently I found great Android application Termux.
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically – additional packages are available using the APT package manager.
I installed it and my first command was
pkg search postgres
Wow! Not only we can have PostgreSQL on Android, but it’s up to date! Cool!