Chapter 18 psql commands
This commit is contained in:
parent
95bb5c2a98
commit
c73941206c
@ -16,6 +16,9 @@ psql -d analysis -U postgres
|
||||
psql -d [database name] -U [username] -h [host name]
|
||||
psql -d analysis -U postgres -h example.com
|
||||
|
||||
-- Format for password file (pgpass.conf on Windows; .pgpass on macOS/Linux)
|
||||
hostname:port:database:username:password
|
||||
|
||||
|
||||
-- Listing 18-1: Entering a single-line query in psql
|
||||
-- Enter this at the psql prompt:
|
||||
@ -53,7 +56,7 @@ DELETE FROM state_regions;
|
||||
\copy state_regions FROM 'C:\YourDirectory\state_regions.csv' WITH (FORMAT CSV, HEADER);
|
||||
|
||||
|
||||
-- Listing 18-8:
|
||||
-- Listing 18-8:
|
||||
|
||||
DELETE FROM state_regions;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user