Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
Difference between username-# and username=# in psql shell?

The user comes up usually in the form username=# in the console once you enter psql into the terminal. But then I noticed it said username-# where the equal sign was replaced with a hyphen but it still seemed to perform the same way.

I know it's a simple question but I'd still like to know. Does this change in symbol mean anything in particular?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It's not username, it's the name of the database you're connected to. Usually each user has a private database, and psql connects to it by default.

The - means you're in the middle of writing an SQL query, or "ending semicolon missing":

test=# select 1+1
test-# ;
 ?column? 
----------
        2
(1 row)

Also, when you have unmatched delimiters, those are shown:

test=# select (1+1
test(# )
test-# ;
 ?column? 
----------
        2
(1 row)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!