문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| dbms:pgsql:clientenv [2008/02/08 13:08] – 새로 만듬 starlits | dbms:pgsql:clientenv [2025/10/03 22:30] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 2: | 줄 2: | ||
| - | ===== The Password File ===== | + | ===== set AUTOCOMMIT OFF in psqlrc not having affect (~/.psqlrc) ===== |
| + | - I have \set AUTOCOMMIT OFF in my .psqlrc and it seems psql seems to not have any effect. \\ Am I missing something? I've been googling and googling and seem a bit lost at this point. | ||
| + | - ~/.psqlrc 에 아래의 내용이 존재하여야 한다. < | ||
| + | $ cat ~/.psqlrc | ||
| + | \set AUTOCOMMIT OFF | ||
| + | \echo ' | ||
| + | \set PROMPT1 ' | ||
| + | \timing | ||
| + | </ | ||
| + | - 시작은 BEGIN으로 시작해야 하며, COMMIT, ROLLBACK 으로 DDL 명령을 실행한다. < | ||
| + | $ psql | ||
| + | Welcome to psql 7.4.5, the PostgreSQL interactive terminal. | ||
| + | |||
| + | Type: \copyright for distribution terms | ||
| + | \h for help with SQL commands | ||
| + | \? for help on internal slash commands | ||
| + | \g or terminate with semicolon to execute query | ||
| + | \q to quit | ||
| + | |||
| + | AUTOCOMMIT is OFF | ||
| + | Timing is on. | ||
| + | host.domain=# | ||
| + | WARNING: | ||
| + | COMMIT | ||
| + | host.domain=# | ||
| + | UPDATE 1 | ||
| + | host.domain=# | ||
| + | WARNING: | ||
| + | COMMIT | ||
| + | host.domain=# | ||
| + | UPDATE 1 | ||
| + | host.domain=# | ||
| + | WARNING: | ||
| + | ROLLBACK | ||
| + | host.domain=# | ||
| + | BEGIN | ||
| + | host.domain=# | ||
| + | UPDATE 1 | ||
| + | host.domain=# | ||
| + | ROLLBACK | ||
| + | host.domain=# | ||
| + | BEGIN | ||
| + | host.domain=# | ||
| + | UPDATE 1 | ||
| + | host.domain=# | ||
| + | ROLLBACK | ||
| + | host.domain=# | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== The Password File(~/ | ||
| - The file ‘.pgpass’ in a user's home directory or the file referenced by PGPASSFILE can contain passwords to be used if the connection requires a password (and no password has been specified otherwise). | - The file ‘.pgpass’ in a user's home directory or the file referenced by PGPASSFILE can contain passwords to be used if the connection requires a password (and no password has been specified otherwise). | ||
| - On Microsoft Windows the file is named ‘%APPDATA%\postgresql\pgpass.conf’ (where ‘%APPDATA%’ refers to the Application Data subdirectory in the user's profile). | - On Microsoft Windows the file is named ‘%APPDATA%\postgresql\pgpass.conf’ (where ‘%APPDATA%’ refers to the Application Data subdirectory in the user's profile). | ||