Top "Psql" questions

Primary interactive shell for PostgreSQL.

How do you use script variables in psql?

In MS SQL Server, I create my scripts to use customizable variables: DECLARE @somevariable int SELECT @somevariable = -1 INSERT INTO …

sql postgresql variables psql
Psql list all tables

I would like to list all tables in the liferay database in my PostgreSQL install. How do I do that? …

postgresql psql
How to select a schema in postgres when using psql?

I have a postgres database with multiple schemas. When I connect to the database from a shell with psql and …

postgresql psql
Alternate output format for psql

I am using PostgreSQL 8.4 on Ubuntu. I have a table with columns c1 through cN. The columns are wide enough …

postgresql output-formatting psql
How to alter a column's data type in a PostgreSQL table?

Entering the following command into a PostgreSQL interactive terminal results in an error: ALTER TABLE tbl_name ALTER COLUMN col_…

sql postgresql psql alter-table alter-column
"psql: could not connect to server: Connection refused" Error when connecting to remote database

I am trying to connect to a postgres database installed in a remote server using the following command: psql -h …

postgresql ubuntu psql centos7
PostgreSQL psql terminal command

I'm trying to get psql to format nicely and am following the docs here. Right now, whenever I do a …

linux postgresql command-line psql
How to show data in a table by using psql command line interface?

Is there a way to show all the content inside a table by using psql command line interface? I can …

psql
PostgreSQL: Why psql can't connect to server?

I typed psql and I get this: psql: could not connect to server: No such file or directory Is the …

postgresql psql
Postgresql -bash: psql: command not found

I have installed PostgreSQL and it is working ok. However, when I went to restore a backup I got the …

linux postgresql psql