'프로그램 사용/postgreSQL'에 해당되는 글 156건

  1. 2019.03.08 postgresql encoding / collate
  2. 2019.03.08 postgresql 설치(centos)
  3. 2019.02.01 postgreSQL centos 패키지
  4. 2019.02.01 postgreSQL 명령어 정리
  5. 2019.02.01 psql - postgreSQL CLI client
  6. 2019.02.01 pgadmin - postgreSQL client

당연하지만.. 얘도 db인지라 인코딩 언어를 설정해주어야 한다..

아무생각없이 그냥 initdb 하면 en_us로 설정되는 망할 centos ㅠㅠ


[링크 : http://linux.systemv.pe.kr/postgresql-과-문자셋/]

[링크 : https://www.postgresql.org/docs/9.5/app-initdb.html]

[링크 : https://www.postgresql.org/docs/9.3/multibyte.html]


+

이런 에러 발생 -_-

[링크 : https://stackoverflow.com/.../strange-postgresql-value-too-long-for-type-character-varying500]


+

윈도우용 postgresql에서 언어설정에 따라 collate가 정해지는데

ko_KR.UTF-8은 포기해도 UTF-8은 포기 못하니 영어(English_United State)로 하라고..

(auto로 하니 한글 윈10에서는 cp949로 되어버린다)

[링크 : https://stackoverflow.com/questions/40673339/creating-utf-8-database-in-postgresql-on-windows10]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql WAL?  (0) 2019.03.14
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
Posted by 구차니

설치

postgresql 은 client

postgresql-server 는 server

# yum install postgresql  postgresql-server 


db 초기화

# service postgresql initdb

(그냥 centos7 에서 이렇게 하니 Encoding이 SQL_ASCII로 Collate가 C로 된다.. 아놔..)

+

$ su -l postgres -c "initdb -E UTF8 --locale=ko_KR.UTF-8 --locale=en_US.utf8"



설정 확인

# chkconfig postgresql on 


서비스 시작

# systemctl start postgresql 

[링크 : https://wiki.postgresql.org/wiki/YUM_Installation]

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=31850584]


사용자 생성 (암호 없이)

# sudo -i -u postgres

# psql

postgres=# create user [계정아이디] with password '';

postgres=# create database [데이터베이스 이름];

postgres=# \q

# exit

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=61899197]

[링크 : http://database.sarang.net/database/postgres/tutorial/lecture/x58.htm]


+

2019.06.18

sudo -u postgres psql postgres

# \password postgres

Enter new password:  

[링크 : https://serverfault.com/questions/110154/...]


암호 바꾸기

postgres=# ALTER USER postgres WITH PASSWORD ''; 


[링크 : https://stackoverflow.com/questions/5421807/set-blank-password-for-postgresql-user]


접속되지 않을 경우

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

# vim /var/lib/pgsql/data/pg_hba.conf

host all all      ::1/128      trust

host all postgres 127.0.0.1/32 trust 


# vim /var/lib/pgsql/data/pg_hba.conf 

listen_addresses = '*'

[링크 : https://dba.stackexchange.com/.../connect-to-postgresql-server-fatal-no-pg-hba-conf-entry-for-host]

[링크 : https://sysops.tistory.com/8]


+

2019.06.18

서비스 재시작만으로는 포트가 안바뀌는 듯..(ubuntu 18.04) 그래서 완전히 재기동을 해야 하는 문제가 있었음


[링크 : https://blog.bigbinary.com/2016/01/23/configure-postgresql-to-allow-remote-connection.html]


+

2020.01.16

psql 상에서 현재 db의 locale을 확인할 수 있다.

# show LC_COLLATE;

[링크 : https://linux.systemv.pe.kr/postgresql-과-문자셋/]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql WAL?  (0) 2019.03.14
postgresql encoding / collate  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
Posted by 구차니

postgresql은 메타페키지가 없는건가?

아무튼 클라이언트는 postgresql로 깔면되고 서버는 postgresql-server로 깔면된다.

(서버가 docker로 돌고 있어서 접속하려고 고민하다가 찾음..)


# yum search postgresql

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

 * base: mirror.kakao.com

 * extras: mirror.kakao.com

 * updates: mirror.kakao.com

======================================================== N/S matched: postgresql =========================================================

freeradius-postgresql.x86_64 : Postgresql support for freeradius

libreoffice-postgresql.x86_64 : PostgreSQL connector for LibreOffice

pcp-pmda-postgresql.x86_64 : Performance Co-Pilot (PCP) metrics for PostgreSQL

postgresql.i686 : PostgreSQL client programs

postgresql.x86_64 : PostgreSQL client programs

postgresql-contrib.x86_64 : Extension modules distributed with PostgreSQL

postgresql-devel.i686 : PostgreSQL development header files and libraries

postgresql-devel.x86_64 : PostgreSQL development header files and libraries

postgresql-docs.x86_64 : Extra documentation for PostgreSQL

postgresql-jdbc.noarch : JDBC driver for PostgreSQL

postgresql-jdbc-javadoc.noarch : API docs for postgresql-jdbc

postgresql-libs.i686 : The shared libraries required for any PostgreSQL clients

postgresql-libs.x86_64 : The shared libraries required for any PostgreSQL clients

postgresql-odbc.x86_64 : PostgreSQL ODBC driver

postgresql-plperl.x86_64 : The Perl procedural language for PostgreSQL

postgresql-plpython.x86_64 : The Python2 procedural language for PostgreSQL

postgresql-pltcl.x86_64 : The Tcl procedural language for PostgreSQL

postgresql-server.x86_64 : The programs needed to create and run a PostgreSQL server

postgresql-static.i686 : Statically linked PostgreSQL libraries

postgresql-static.x86_64 : Statically linked PostgreSQL libraries

postgresql-test.x86_64 : The test suite distributed with PostgreSQL

postgresql-upgrade.x86_64 : Support for upgrading from the previous major release of PostgreSQL

qt-postgresql.i686 : PostgreSQL driver for Qt's SQL classes

qt-postgresql.x86_64 : PostgreSQL driver for Qt's SQL classes

qt3-PostgreSQL.i686 : PostgreSQL drivers for Qt 3's SQL classes

qt3-PostgreSQL.x86_64 : PostgreSQL drivers for Qt 3's SQL classes

qt5-qtbase-postgresql.i686 : PostgreSQL driver for Qt5's SQL classes

qt5-qtbase-postgresql.x86_64 : PostgreSQL driver for Qt5's SQL classes

PyGreSQL.x86_64 : A Python client library for PostgreSQL

apr-util-pgsql.x86_64 : APR utility library PostgreSQL DBD driver

libdbi-dbd-pgsql.x86_64 : PostgreSQL plugin for libdbi

perl-DBD-Pg.x86_64 : A PostgreSQL interface for perl

php-pgsql.x86_64 : A PostgreSQL database module for PHP

python-psycopg2.x86_64 : A PostgreSQL database adapter for Python

python-psycopg2-debug.x86_64 : A PostgreSQL database adapter for Python 2 (debug build)

python-psycopg2-doc.x86_64 : Documentation for psycopg python PostgreSQL database adapter

redland-pgsql.x86_64 : PostgreSQL storage support for Redland

rhdb-utils.x86_64 : Miscellaneous utilities for PostgreSQL - Red Hat Edition

tcl-pgtcl.x86_64 : A Tcl client library for PostgreSQL


  Name and summary matches only, use "search all" for everything. 



[링크 : https://unix.stackexchange.com/questions/249494/install-postgresql-client-psql-only-on-centos]



+ 2020.01.16


[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=31850584]

[링크 : https://www.postgresql.org/download/linux/redhat/] 패키지

[링크 : https://www.manualfactory.net/10153]  방화벽

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

psql로 접속해서 보는중


mysql의 show databases;

\l

[링크 : http://www.postgresqltutorial.com/postgresql-show-databases/]


mysql의 show tables;

\dt


얘랑 같다는데 실제로 해보니 \dt는 자신의 테이블만 보여주도록 WHERE 가 추가된 느낌?

SELECT * FROM pg_catalog.pg_tables; 


굳이 좀더 쓰자면 아래에 가까운?

SELECT * FROM pg_catalog.pg_tables WHERE tableowner='username;' 


[링크 : https://stackoverflow.com/questions/769683/show-tables-in-postgresql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

설치는 yum install postgresql

psql 이라는 명령어로 실행


[링크 : https://zetawiki.com/wiki/CentOS_PostgreSQL_클라이언트_설치]

[링크 : https://zetawiki.com/wiki/리눅스_PostgreSQL_클라이언트_psql]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
pgadmin - postgreSQL client  (0) 2019.02.01
Posted by 구차니

쓸일이.. 생겨부렀네? ㅠㅠ


[링크 : https://www.pgadmin.org/]


온갖 OS를 다 지원은 하는데.. QT라니!!!

pgAdmin 4 is a complete rewrite of pgAdmin, built using Python and Javascript/jQuery. A desktop runtime written in C++ with Qt allows it to run standalone for individual users, or the web application code may be deployed directly on a webserver for use by one or more users through their web browser. The software has the look and feel of a desktop application whatever the runtime environment is, and vastly improves on pgAdmin III with updated user interface elements, multi-user/web deployment options, dashboards and a more modern design. 

[링크 : https://www.pgadmin.org/download/]


+

2019.06.04

python / django 기반

 sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

sudo apt install wget ca-certificates

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add

sudo apt update

sudo apt install pgadmin4


[링크  : https://o7planning.org/en/11353/installing-pgadmin-on-ubuntu]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
Posted by 구차니