본문 바로가기
반응형

호구지책/DB34

[postgreSQL] 자동 로그인을 위한 암호파일(pgpass.conf) 윈도우에서만 사용할 수 있는 방법이다. pgpass.conf 파일을 사용해서 자동 로그인을 할 수 있다.특정한 폴더(%AppData%\postgresql\)에 파일을 만들어서 넣어주면 된다. 8.0버전 이상에서 동작한다. 그 이하 버전은 PGPASSWORD 환경변수를 설정해서 처리한다. pgpass.conf 내용호스트명 : 포트 : 데이터베이스:유저ID:암호localhost : 5432 : mydb : myuser : mypassword 라이브러리에 대한 코멘트pgpass.conf 파일도 libpq 라이브러리 의존적입니다. 그래서, pg_dump 에서는 되는데, psql 에서는 되질 않는다는 경우는 두 프로그램이 서로 다른 libpq 라이브러리를 사용하는 경우가 아니고서는 있을 수 없는 일입니다. 다시 .. 2017. 5. 27.
[postgreSQL] 환경변수들 리눅스는 export PGUSER=postgres 윈도우는 set PGUSER=postgres 이렇게 설정한다. set은 대문자로 써도 관계가 없다. export를 대문자로 써도 괜찮은지는 아직 확인하지 않았다. 그런데 윈도우 배치파일에서는 쌍따옴표(")를 넣으면 안된다. 잘못된 예시 set PGUSER="postgres" rem id를 ""postgres""로 인식하게 된다. 참조 https://www.postgresql.org/docs/9.1/static/libpq-envars.html 2017. 5. 26.
[postgreSQL] 설치 중 경고 발생 Problem Running Post-Install Step. Installation May Not Complete Correctly. The Database Cluster Initialisation Failed. 삭제 후 재설치를 하는데, 다음과 같은 경고 메시지가 표시된다.해결책을 찾아보면 postgre 계정을 지우고 다시 만들어서실행하라고 나온다. 근데 해당 계정자체가 아예 없는 경우는??EnterpriseDB버전으로 설치한 경우엔 뭔가 다르게 해야 될 거 같은데. 완전 삭제법을 알아야 될 거 같다. *윈도우에서 이것이 발생하는 이유는 윈도우 배치파일로 initdb를 실행한 경우다.EnterpriseDB는 자동으로 initdb를 실행하므로 추가적으로 initdb를 실행할 필요가 없다.오히려 실행하면.. 2017. 5. 26.
[postgreSQL] 무인설치모드(mode unattended) postgreSQL mode unattended postgreSQL에는 무인설치(unattended)라는 모드가 있다.한번만 실행하면 자동적으로 셋팅값을 읽어서 설치하는 것이다.무인설치는 다른 말로 사일런스 설치(silence) 라고도 한다.하지만 자료는 무인설치라고 찾아볼 때 더 적확하다. 이때, 셋팅값은 개발자가 이미 셋팅해주어야 한다. 설치방식은 커맨드라인 방식이다. 커맨드라인에 설치에 필요한 값을미리 셋팅한다. 사용자는 해당 bat파일을 실행만 하면 된다. 그러면 원클릭으로 Database를 설치할 수 있다. 무인설치 명령어 (wnidows OS) postgres-version-windows.exe --mode unattended --superpassword database_superuser_pa.. 2017. 5. 25.
[postgreSQL] 설명 모음집 [PostgreSQL Admin] - 7. Tablespacehttp://ktdsoss.tistory.com/404PostgreSQL 9.4.1 DocumentationC:\Program Files\PostgreSQL\9.4\doc\postgresql\html\index.htmlPL/pgSQL (en)http://postgres.cz/wiki/PL/pgSQL_(en)ActivePerl Downloadshttp://www.activestate.com/activeperl/downloadsK's LAB Postgresql 마이그레이션도구 Ora2Pg 소개http://ap424.tistory.com/1ora2pghttp://ora2pg.darold.net/index.htmlOracle to Postgres Co.. 2017. 5. 25.
[postgreSQL] 기본값 설정하기 (Set Default Value) #포스트그레스큐엘 기본값 설정 alter table sloghistory alter column juminno set default ''; alter table sloghistory alter column cid set default ''; alter table sloghistory alter column tflag1 set default b'1'; b를 붙인 것은 bit형이라는 표시다 참조 [PGSQL] Column에 Default value 지정 2017. 5. 21.
반응형