Usage:
psql [options] [dbname [username]]
Options:
-a Echo all input from script
-A Unaligned table output mode (-P format=unaligned)
-c <query> Run only single query (or slash command) and exit
-d <dbname> Specify database name to connect to (default: postgres)
-e Echo queries sent to backend
-E Display queries that internal commands generate
-f <filename> Execute queries from file, then exit
-F <string> Set field separator (default: "|") (-P fieldsep=)
-h <host> Specify database server host (default: domain socket)
-H HTML table output mode (-P format=html)
-l List available databases, then exit
-n Disable readline
-o <filename> Send query output to filename (or |pipe)
-p <port> Specify database server port (default: hardwired)
-P var[=arg] Set printing option 'var' to 'arg' (see \pset command)
-q Run quietly (no messages, only query output)
-R <string> Set record separator (default: newline) (-P recordsep=)
-s Single step mode (confirm each query)
-S Single line mode (newline terminates query)
-t Print rows only (-P tuples_only)
-T text Set HTML table tag options (width, border) (-P tableattr=)
-U <username> Specify database username (default: postgres)
-v name=val Set psql variable 'name' to 'value'
-V Show version information and exit
-W Prompt for password (should happen automatically)
-x Turn on expanded table output (-P expanded)
-X Do not read startup file (~/.psqlrc)
-- 헌터^^ 님이 쓰신 글:
>> pgSQL 에서 MySQL의 show databases 와 같은 기능을 하는 명령어를 알고싶은데... 넘 쉬워서 그런건지 잘 찾아지지가 않네요. ㅠㅠ
>>
>> 그리구요, 처음 pgSQL 실행할때
>> $ ./psql DB_name
>> 이라고 DB 이름을 선택하고 들어가잖아요..
>> 그냥, 일단 들어가서 DB 리스트를 볼수는 없을까요?
>>
>> 만약 안된다면, 옛날에 만들어 뒀던 DB 들의 이름을 모조리 까먹었을때는 어떻게 DB를 볼수가 있는거죠?
|