Category: postgres

Upload PostgreSQL not working, change the encoding may help

Upload PostgreSQL not working, change the encoding may help

When we upload and restore the backup into new postgresql server, sometimes we facing problem because encoding. To solve this, we can use UTF-8 : 1update pg_database set encoding = pg_char_to_encoding(‘UTF8’) where datname = ‘your-database’;

Setup pgpass in Windows

Setup pgpass in Windows

To setup pgpass in windows, please go to : 1C:\Users\<your-user>\AppData\Roaming Create “postgresql” folder and create pgpass.conf file inside. 1localhost:5432:*:postgres:<your-password>