사용자 도구

사이트 도구


dbms:pgsql:clientenv

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
dbms:pgsql:clientenv [2008/02/08 13:08]
starlits 새로 만듬
dbms:pgsql:clientenv [2008/02/08 13:19] (현재)
starlits
줄 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 에 아래의 내용이 존재하여야 한다. <code> 
 +$ cat ~/.psqlrc 
 +\set AUTOCOMMIT OFF 
 +\echo 'AUTOCOMMIT is' :AUTOCOMMIT 
 +\set PROMPT1 'host.%/%R%#
 +\timing 
 +</code> 
 +  - 시작은 BEGIN으로 시작해야 하며, COMMIT, ROLLBACK 으로 DDL 명령을 실행한다. <code> 
 +$ 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=# commit; 
 +WARNING:  there is no transaction in progress 
 +COMMIT 
 +host.domain=# update foo set foo_type_id = 3 where foo_id=200000234; 
 +UPDATE 1 
 +host.domain=# commit; 
 +WARNING:  there is no transaction in progress 
 +COMMIT 
 +host.domain=# update foo set foo_type_id = 3 where foo_id=200000234; 
 +UPDATE 1 
 +host.domain=# rollback; 
 +WARNING:  there is no transaction in progress 
 +ROLLBACK 
 +host.domain=# begin; 
 +BEGIN 
 +host.domain=# update foo set foo_type_id = 3 where foo_id=200000234; 
 +UPDATE 1 
 +host.domain=# rollback; 
 +ROLLBACK 
 +host.domain=# begin; 
 +BEGIN 
 +host.domain=# update foo set foo_type_id = 3 where foo_id=200000234; 
 +UPDATE 1 
 +host.domain=# rollback; 
 +ROLLBACK 
 +host.domain=# \q 
 +</code> 
 + 
 + 
 + 
 +===== The Password File(~/.pgpass) =====
   - 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). 
dbms/pgsql/clientenv.1202443697.txt.gz · 마지막으로 수정됨: 2008/02/08 13:08 저자 starlits