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

  1. 2019.06.25 postgresql csv import
  2. 2019.06.25 데이터베이스 테이블 복제하기(내용 없이)
  3. 2019.06.25 postgresql insert 속도 올리기
  4. 2019.06.25 postgresql ''
  5. 2019.06.25 postgresql truncate table
  6. 2019.06.24 libpq
  7. 2019.06.18 xsd to postgresql DDL
  8. 2019.06.14 postgresql dbms 설정
  9. 2019.06.13 pgadmin dashboard 살려내기
  10. 2019.06.12 postresql backup & recovery

헤더가 들어가는 csv는 옵션이 좀더 붙네?

 

csv 포맷은

"col1","col2"

"13123","faskfjasldf"

 

psql에서 명령어는 아래와 같이 하면 된다.

\COPY persons FROM 'filename.csv' DELIMITER ',' CSV HEADER;

[링크 : http://www.postgresqltutorial.com/import-csv-file-into-posgresql-table/]

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

union sql  (0) 2019.06.28
postgresql csv update  (0) 2019.06.26
데이터베이스 테이블 복제하기(내용 없이)  (0) 2019.06.25
postgresql insert 속도 올리기  (0) 2019.06.25
postgresql ''  (0) 2019.06.25
Posted by 구차니

postgresql에서 테스트 함

내용 복제하지 않고, 형태만 복사하기

create table bbbbbbb as select * from aaaaaaa where 1=2

[링크 : https://dmsrbdi123.tistory.com/12]

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

postgresql csv update  (0) 2019.06.26
postgresql csv import  (0) 2019.06.25
postgresql insert 속도 올리기  (0) 2019.06.25
postgresql ''  (0) 2019.06.25
postgresql truncate table  (0) 2019.06.25
Posted by 구차니

아쉽게도(?) 쿼리나 시스템 보다는

해당 table의 log를 끄는게 더 효율적인듯(트랜잭션 로그 끄는건가?)

 

[링크 : https://gist.github.com/valyala/ae3cbfa4104f1a022a2af9b8656b1131]

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

postgresql csv import  (0) 2019.06.25
데이터베이스 테이블 복제하기(내용 없이)  (0) 2019.06.25
postgresql ''  (0) 2019.06.25
postgresql truncate table  (0) 2019.06.25
libpq  (0) 2019.06.24
Posted by 구차니

 

[링크 : https://www.postgresql.org/docs/9.3/sql-syntax-lexical.html]

 

+

2019.08.24

왜 검색해둔거지? =0=

일단은 " 로는 에러가 나고 ' 로 해야지 되는게 대부분이라.. 일단은 문자열을 위한 문법에서는 '만 허용하는걸로..

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

데이터베이스 테이블 복제하기(내용 없이)  (0) 2019.06.25
postgresql insert 속도 올리기  (0) 2019.06.25
postgresql truncate table  (0) 2019.06.25
libpq  (0) 2019.06.24
xsd to postgresql DDL  (0) 2019.06.18
Posted by 구차니

한번에 테이블 내용 싹다 비우는 좋은 명령어!

(근데 rm -rf / 의 기운이 느껴지는건 기분탓인가...)

 

[링크 : https://www.postgresql.org/docs/9.1/sql-truncate.html]

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

postgresql insert 속도 올리기  (0) 2019.06.25
postgresql ''  (0) 2019.06.25
libpq  (0) 2019.06.24
xsd to postgresql DDL  (0) 2019.06.18
postgresql dbms 설정  (0) 2019.06.14
Posted by 구차니

c용 postgresql 라이브러리

libpg-dev를 설치하면 되려나?

 

[링크 : https://www.postgresql.org/docs/9.1/libpq-example.html]

[링크 : https://www.postgresql.org/docs/9.5/libpq-connect.html]

[링크 : http://www.askyb.com/cpp/c-postgresql-example/] cpp class

 

 

+

sudo apt-get install libpq-dev

vi pg_exam.c

#include <postgresql/libpq-fe.h>

gcc pg_exam.c -lpq

./a.out "dbname=postgres host=localhost user=postgres password=postgres"

[링크 : https://www.postgresql.org/docs/8.3/libpq-build.html]

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

postgresql ''  (0) 2019.06.25
postgresql truncate table  (0) 2019.06.25
xsd to postgresql DDL  (0) 2019.06.18
postgresql dbms 설정  (0) 2019.06.14
pgadmin dashboard 살려내기  (0) 2019.06.13
Posted by 구차니

별다르게 빌드 안하고 이미 빌드 된 녀석으로 바로 실행해도 잘 된다.

java -classpath ./xsd2pgschema.jar xsd2pgschema --xsd xsd_file > ddl.psql

[링크 : https://sourceforge.net/projects/xsd2pgschema/]

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

postgresql truncate table  (0) 2019.06.25
libpq  (0) 2019.06.24
postgresql dbms 설정  (0) 2019.06.14
pgadmin dashboard 살려내기  (0) 2019.06.13
postresql backup & recovery  (0) 2019.06.12
Posted by 구차니

WAL은 트랜잭션 데이터?

 

[링크 : http://hochul.net/blog/postgresql-configuration-tuning-basic-guide/]

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

libpq  (0) 2019.06.24
xsd to postgresql DDL  (0) 2019.06.18
pgadmin dashboard 살려내기  (0) 2019.06.13
postresql backup & recovery  (0) 2019.06.12
postgresql schema  (0) 2019.06.12
Posted by 구차니

실수로 오른쪽의 X를 눌러 없앴는데

다시 살리는법 찾다가 도움되는건 못보고

걍 위에 우클릭하고 Add Panel 하니 다시 살릴수 있네...

 

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

xsd to postgresql DDL  (0) 2019.06.18
postgresql dbms 설정  (0) 2019.06.14
postresql backup & recovery  (0) 2019.06.12
postgresql schema  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
Posted by 구차니

기존의 시스템에서 사용자가 설치한 postgresql 을 쓰고 있는데

이걸 리눅스 패키지에서 제공하는 녀석으로 파일 레벨에서 갈아 치우는 방법 찾는 중

(일일이 백업해서 옮기기 귀찮...)

 

[링크 : https://www.postgresql.org/docs/9.1/backup-file.html]

[링크 : https://stackabuse.com/backing-up-and-restoring-postgresql-databases/]

 

 

+

[링크 : https://h391106.tistory.com/352]

 

 

+

정 안되면 

pg_dumpall | gzip > backup.gz

식으로 한번 뺴봐야 할 듯

 

[링크 : https://www.postgresql.org/docs/9.1/backup-dump.html]

 

+

[링크 : https://www.opsdash.com/blog/postgresql-backup-restore.html]

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

postgresql dbms 설정  (0) 2019.06.14
pgadmin dashboard 살려내기  (0) 2019.06.13
postgresql schema  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
postgresql drop all tables  (0) 2019.06.05
Posted by 구차니