CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 13:12:26 GMT
content-type: text/html; charset=utf-8
cf-ray: 963b6de898d9b080-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=c6dfcdca-3f45-4a16-9889-7dda5e664997; expires=Thu, 23 Jul 2026 13:12:25 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-frame-options: SAMEORIGIN
x-request-guid: 1c61c9a8-a1aa-4008-b8f2-b95b870da183
x-worker-origin-response-time: 532000000
x-dns-prefetch-control: off
set-cookie: prov=c6dfcdca-3f45-4a16-9889-7dda5e664997; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=QQ0nGQkT5ZCaX7iWh4wC4Y_5nUvPvjIugrEZmz2fHAA-1753276346-1.0.1.1-7EAfHV_IH0YI6T1JdQPE1WJTd9hwp3VdDtY6E_g2lpF9xFvEqaq1F4Ff4QrYhfHAvkAuk4e_914vB1mmnMUgkAalpfooMgIV7Rm5MRDewMc; path=/; expires=Wed, 23-Jul-25 13:42:26 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=XgLu.17TRaV6jytoTDTh1q_Pb3gW0rE1BdgJWMLns4M-1753276346244-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'psql' Questions - Database Administrators Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [psql]
psql is the primary interactive terminal for PostgreSQL. (DO NOT USE THIS TAG for questions targeting PostgreSQL!)
378 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
2
answers
41
views
psql subshell \! command - how to get the effect of variable interpolation or backquote expansion
The psql manual for the subshell command "\!" says
Unlike most other meta-commands, the entire remainder of the line is
always taken to be the argument(s) of \!, and neither variable
...
3
votes
1
answer
42
views
Postgres: limiting serialization errors on serializable transactions
Recently I learnt that serializable isolation level in Postgres is based on optimistic locking, hence theoretically can be performed fully concurrently as long as transactions do not interfere with ...
2
votes
1
answer
250
views
Finding execution time of a psql query (without any connection latency/overhead)
How do I find the execution time of a query?
I tried these methods:
pgbench - pgbench -n -t 1 -f ./query.sql <database name>
got:
latency average = 9.787 ms <- should i take this as the ...
0
votes
1
answer
151
views
Postgres remove FKey without lock
Edited :
I need to remove foreign key constraints from some PostgreSQL tables. However, these tables are heavily used and contain a significant volume of data. Some are partitioned, while others are ...
2
votes
3
answers
310
views
Deleting multiples that aren't exact PostgreSQL
I think the issue came when inserting my data, some of the data looks like this:
id
year
1
2000
1
2001
1
2002
2
2000
2
2001
2
2002
3
2000
3
2001
3
2002
Where the intention was for it to look like this:...
0
votes
1
answer
245
views
Get the size of all PostgreSQL DB
I would like to know all the sizes of all the PostgreSQL DB running on a particular system.
For example, in a system I have installed PostgreSQL and created multiple databases(mydb_1, mydb_2, mydb_3......
1
vote
1
answer
118
views
Where is the language of psql system messages defined?
I am installing postgresql 16 on a Japanese version of windows.
I do not use any wsl.
C:\Program Files\PostgreSQL\16\data\postgresql.conf
All settings such as lc_messages in the configuration file are ...
0
votes
1
answer
411
views
Environment variable $PGUSER does NOT take effect with Postgresql client?
For many years I have used to use the environment variable $PGUSER when I work with client tools such as psql/pg_dump/pg_restore.
Recently I build up a new PG13 server, the env var $PGUSER does NOT ...
0
votes
0
answers
89
views
Unable to execute psql with postgres user
After a server failure I'm not able to execute psql like psql -U postgres nor like sudo -u postgres psql. In both cases I'm asked for the user password despite I've modified the pg_hba.conf files to ...
1
vote
1
answer
125
views
Why listen_addresses not changing in PostgreSQL?
I'm trying to ENABLE remote client access on my PostgreSQL 12 database (Ubuntu 20.04 LTS).
I've changed postgresql.conf on both paths /var/lib/postgresql/12/main and /etc/postgresql/12/main this way:
...
0
votes
1
answer
42
views
PgSQL returns results at different speeds from same execution plan, but different query using CTE vs. nested select, why?
db=> explain analyze with data as (select a, b, c from D where e='something') select * from Data;
QUERY PLAN
---------------------------...
2
votes
1
answer
424
views
PostgreSQL: pg_dump fails to correctly pg_restore due to missing or erroneous custom function, but present in dump
I am running PostgreSQL 13.15 in a local docker container, with matching pg_dump/pg_restore versions. When dumping and restoring the database, one of the custom functions that was previously present ...
0
votes
1
answer
78
views
Cannot connect postgresql server
i ran some error today with my postgresql maybe someone can help. I install Postgresql in windows server. I connect using PgAdmin. Usually i just enter my master password, then the next step i enter ...
0
votes
0
answers
142
views
How do I change the console font for psql in PostgreSQL 16.3?
I don't know how this has happened (I may have changed something in my PostgreSQL / psql settings) but now everytime I open the psql console I get the following error:
"WARNING: Console code page ...
0
votes
1
answer
171
views
Locking write to tables while Postgres procedure is executing
I have created a procedure in Postgres that will create a table with the contents of another three tables (SELECT with JOINS). Then the resulting table will be altered adding two columns that didnt ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
postgresql × 331
pg-dump × 20
copy × 15
linux × 12
command-line × 11
permissions × 11
pgadmin × 11
scripting × 11
ubuntu × 10
mac-os-x × 9
postgresql-9.3 × 9
windows × 8
csv × 7
bash × 7
errors × 7
pg-restore × 7
postgresql-9.4 × 6
backup × 5
index × 5
postgresql-9.5 × 5
client × 4
database-design × 4
foreign-key × 4
json × 4
performance × 4
more related tags
Hot Network Questions
- How do mechanical gyros maintain rotational speed?
- What fiction genres do literary agents recognize?
- Error when sending an email with attached PDF using Google Script
- How would a DiVicenzo machine prepare the maximally mixed state with a small number of ancilla qubits?
- Fit text on TWO pages by varying font size automatically
- A soviet sci-fi novel (novelette?) with frogs?
- How can I grow kelp or seaweed at home in a small container?
- Entity Framework - Is there a safety mechanism to prevent accidentally running Update-Database?
- Why does contact with the ground make my touch-activated LED brighter?
- Why is `&self` allowed in the parameters of `&mut self` methods, but not `&mut self`?
- I wonder whether there exists a book of "Formal power series" and "Formal infinite products"?
- Is classical logic the consensus among contemporary logicians?
- OId Movie about an alien city that plays a repeating melody
- Ubuntu gives the message "You are in emergency mode."
- bootstrapping for variance estimation takes too long
- Is a Rakshasa Immune to True Strike?
- grep behaviour is different when run using bash -c '...'
- SOSL/SOQL isn't returning User records
- Why is the number of Marie Curie postdoctoral fellowships in mathematics significantly lower than in other subjects?
- What is the consistency strength of Russell & Whitehead's ‘Principia Mathematica’?
- Idempotent integral operator
- Why does my door knob bolt catch in the retracted position?
- Is it better to nest figure environments inside proof environments, or leave them separate?
- Will I lose my seat reservation on Deutsche Bahn EC if I skip the first leg?