Tải bản đầy đủ

PostgreSQL up and running

rsion
output version information, then exit
Input and output options:
-a, --echo-all
echo all input from script
-e, --echo-queries
echo commands sent to server
-E, --echo-hidden
display queries that internal commands generate
-L, --log-file=FILENAME send session log to file
-n, --no-readline
disable enhanced command line editing (readline)
-o, --output=FILENAME
send query results to file (or |pipe)
-q, --quiet
run quietly (no messages, only query output)
-s, --single-step
single-step mode (confirm each query)
-S, --single-line
single-line mode (end of line terminates SQL command)
Output format options:

-A, --no-align
unaligned table output mode
-F, --field-separator=STRING
set field separator (default: "|")
-H, --html
HTML table output mode
-P, --pset=VAR[=ARG]
set printing option VAR to ARG (see \pset command)
-R, --record-separator=STRING
set record separator (default: newline)
-t, --tuples-only
print rows only
-T, --table-attr=TEXT
set HTML table tag attributes (e.g., width, border)
-x, --expanded
turn on expanded table output
-z, --field-separator-zero
set field separator to zero byte
-0, --record-separator-zero
set record separator to zero byte
Connection options:
-h, --host=HOSTNAME

database server host or socket directory

144 | Appendix: Install, Hosting, and Command-Line Guides

www.it-ebooks.info


-p,
-U,
-w,
-W,

--port=PORT
--username=USERNAME
--no-password
--password


database server port (default: "5432")
database user name
never prompt for password
force password prompt (should happen automatically)

For more information, type "\?" (for internal commands) or "\help" (for SQL
commands) from within psql, or consult the psql section in the PostgreSQL
documentation.

These items are new features introduced in PostgreSQL 9.2.

PostgreSQL Packaged Command-Line Tools | 145

www.it-ebooks.info


www.it-ebooks.info


About the Authors
Regina Obe is a co-principal of Paragon Corporation, a database consulting company
based in Boston. She has over 15 years of professional experience in various
programming languages and database systems, with special focus on spatial databases.
She is a member of the PostGIS steering committee and the PostGIS core development
team. Regina holds a BS degree in mechanical engineering from the Massachusetts
Institute of Technology. She co-authored PostGIS in Action.
Leo Hsu holds an MS degree in engineering of economic systems from Stanford Leo
Hsu is a co-principal of Paragon Corporation, a database consulting company based in
Boston. He has over 15 years of professional experience developing and thinking about
databases for organizations large and small. Leo holds an MS degree in engineering of
economic systems from Stanford University and BS degrees in mechanical engineering
and economics from the Massachusetts Institute of Technology. He co-authored
PostGIS in Action.

www.it-ebooks.info


www.it-ebooks.info



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay

×