Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

222
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda