일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- conda
- ubuntu
- List
- DROP
- mysql
- 쉘
- ngui
- SVN
- Shader
- c++11
- pi
- awk
- pandas
- autovacuum
- if
- SSH
- C++
- sql
- 배열
- with
- expect
- postgresql
- Unity
- dataframe
- python
- FIND
- Eclipse
- boost
- null
- sqlite
- Today
- Total
목록프로그래밍/SQL (58)
その先にあるもの…
https://nrise.github.io/posts/postgresql-autovacuum/
문제발생 sudo service postgresql start db가 시작을 하지 않는다. 원인 db에 관련된 .conf파일들을 불러오지 못했다. 과정 postgres 계정 전환 cd /usr/lib/postgresql/10/bin ./pg_ctl -D /DB저장디렉토리 start 를 하면 실행 실패 log를 보여준다. 참조 실행 시 로그를 확인 https://browndwarf.tistory.com/1 postgresql 설정 파일 위치 확인 설정파일 - /var/lib/pgsql/9.4/data/postmaster.opts /user/pgsql-9.4/bin/postgres "-D" "" https://owin2828.github.io/devlog/2020/10/19/etc-8.html https:/..
www.gurubee.net/lecture/2939 유저 생성 CREATE USER user-name; CREATE USER user-name PASSWORD '암호'; CREATE USER user-name PASSWORD '암호' SUPERUSER CREATEDB; www.gurubee.net/lecture/2942 database 생성 CREATE DATABASE db-name; CREATE DATABASE db-name OWNER user-name; zetawiki.com/wiki/PostgreSQL_%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4_%EC%86%8C%EC%9C%A0%EC%9E%90_%EB%B3%80%EA%B2%BD DB생성하고 US..
update table-name set field = case value when 1 then 10 when 2 then 20 when 3 then 30 when 4 then 40 when 5 then 50 end; public.function() ~~~ begin case value when 1 then return 10 when 2 then return 20 when 3 then return 30 when 4 then return 40 when 5 then return 50 end case; end;
함수 목록 확인 \df \df 함수 이름 함수 내용 보기 \df+ 함수 이름 kldp.org/node/94203
$ 유저 접속 psql -U 유저이름 -d db이름 PGPASSWORD=패스워드 psql -U 유저이름 -d db이름 $ 쿼리 실행 PGPASSWORD=패스워드 psql -U 유저이름 -d db이름 -c 'select * from table' $ 파일에 저장되어 있는 쿼리 실행 PGPASSWORD=패스워드 psql -U 유저이름 -d db이름 -f query.sql PGPASSWORD=패스워드 psql -U 유저이름 -d db이름 < query.sql $원격지 database접속 psql -h 000.000.000.000 -U 유저이름 -d db이름