Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
0 answers
38 views

Use EOF to execute multi-line command in PSQL

I'm trying to run a PostgreSQL anonymous block in psql in nohup mode and capture the log in an output file. I am trying to put the code inside EOF but I always get an error. Not sure how to implement ...
Mano's user avatar
  • 669
0 votes
1 answer
28 views

psql error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory

I was installing postgres on macos sonoma (apple M1 chip) and after installing, then starting the service and finally running psql in the terminal I ran into this error psql: error: connection to ...
Njeri Ngigi's user avatar
0 votes
0 answers
55 views

psql prompt for creating database doesn't work

in psql i'm trying to create a database, but nothing really happens seems like psql is expecting me to continue with the prompt. postgres=# CREATE DATABASE testdb1; ; ; \q ^CCancel request sent ERROR:...
panzi's user avatar
  • 11
0 votes
1 answer
47 views

Why does the SELECT OFFSET take the same time as the SELECT without OFFSET?

id is the primary key. EXPLAIN SELECT id FROM data LIMIT 1000000 Limit (cost=0.44..18840.00 rows=1000000 width=8) EXPLAIN SELECT id FROM data LIMIT 1000000 OFFSET 1000000 Limit (cost=18840.00.....
bashism's user avatar
  • 31
1 vote
1 answer
31 views

Problem with PSQL encoding of french in Windows cmd prompt

I've been struggling with PSQL and encoding in Windows cmd prompt for a while now and although I managed to make it work about 4 times with 4 different databases, it seems that every time the problem ...
Randomer's user avatar
1 vote
1 answer
55 views

PostgreSQL: Query with ORDER BY, LIMIT, and OFFSET consistently returns the same record at the end of the result set regardless of OFFSET value

Our team has sat on this for a while and struggling to understand what is going. When ordering by created_at and all the created_ats are the same for the records we see the same record appearing as ...
Leor Seligman's user avatar
0 votes
1 answer
21 views

Copying tab-delimited file in Postgress with empty files

I'm trying to import a tab-delimited file using the PSql COPY command copy TABLE(col1, col2, etc) from /file.txt'; The problem is that some of my columns are empty. This includes the last column....
Peter Kronenberg's user avatar
0 votes
0 answers
25 views

How to create a trigger to update columnA using columnB value after insert in postgresDB?

I am loading data to postgresDB from a csv file using psql in shell and want to create trigger which updates columnA using columnB value. Postgres DB - TableA - (columnA, columnB, stripped_columnA, ...
Franklin Raja's user avatar
0 votes
0 answers
27 views

Dynamic csv import using batch

I need to import daily csv files with the name "DailySummary%todaysdate%" into my postgres table. I tried using a dynamic copy function which I can't seem to figure out. Would it be better ...
John's user avatar
  • 27
0 votes
0 answers
25 views

Making batch file to run .sql files and dynamic import

Couple of problems. Need to run a .sql file from batch. (do they run the queries from top to bottom kinda thing?) Having some problems connecting to psql, database, and schema. In one of the querys I ...
John's user avatar
  • 27
0 votes
1 answer
31 views

Changing primary replication config in standby node

I want to change the primary information to new primary node in standby postgresql node. I have this: # In standby server psql -At -U $POSTGRES_USER -d $POSTGRES_DB -p $PGPORT -c "ALTER SYSTEM ...
ABC's user avatar
  • 123
0 votes
1 answer
35 views

Cannot create relation(table) in my postgresql database

I'm trying to create a Spring Boot API and connect it to a simple Postgresql database that I have created . I am connecting to a local server. I'm trying to set up the connection so that my table is ...
Rezi Ogbogbaidi's user avatar
0 votes
1 answer
25 views

Psql giving permission denied on loading via file

My problem is similar to the one here but the solution doesn't seem to work. I have a file data.sql at /path/to/file/data.sql. I connect log in to the shell as postgres user via: (py39bot) me@pop-os:~/...
R Walser's user avatar
  • 436
0 votes
1 answer
50 views

Is it possible to call psql with an password encrypted in PowerShell?

Is it possible to call psql with passwords encrypted in Powershell? There are many documents that describe hiding passwords with Get-Credential, ConvertFrom-SecureString and ConvertTo-SecureString. ...
Sanjaya Balasuriya's user avatar
0 votes
1 answer
27 views

PostgreSQL: How to pass multiple parameters from command line?

I am following the other topic, but unfortunately i couldn't comment on that as i don't meet requirement to comment (less reputation). If someone can help me, i really appreciate it. topic is here ...
jojo's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
168