how can i check the port where my postgresql is running code example Example: how to check port number for postgresql SELECT * FROM pg_settings WHERE name = 'port';