Relative Content

Tag Archive for psql

psql how to restore a broken connection

I have a open psql session using the psql cli on a Ubuntu machine.
The server is only accessible via a specific VPN. Sometimes, I have to switch VPN and I cannot activate both VPNs at the same time.

Slowness in function call in PostgreSQL

I have written a function in postgreSQL which returns integer.
The function was taking only .05 seconds to execute in the DB.
The DB was then backed up, restored and upgraded to PG 15 from PG 10.
All the data, pg_setting parameters, indexes are all the same in both DBS.
But the same function call is now taking 0.5 seconds to load instead of 0.05 seconds.
Is there any solution?

PSQL update with aggregate function

I’m having a problem with using a aggregate functions with UPDATE.
The p_ew is empty column from table “G5” and pow_ew is column full of recort from table “tabela”.
I used this command.