-
내가 정리한 PostgreSQL 커멘드Command 모음
-
230718_PostgreSQL 14 Internal 최종본 (postgrespro.com)Geeknews
- PostgreSQL 14의 내부구조(스냅샷, 버퍼캐시, WAL, 잠금, 질의 실행, 각종 색인)에 대해 소개한 무료 이북의 최종본이 지난 3월 즈음에 나왔길래 뒤늦게나마 소개해 봅니다.
-
(외부링크)https://neon.tech/postgresql/postgresql-getting-started/postgresql-sample-database
PostgreSQL Tutorial|🔝|
- https://neon.tech/postgresql/tutorial
- 한국 사람이 정리한 Blog 글
docker run -p 5432:5432 --name test-postgres \
-e POSTGRES_PASSWORD=1234 \
-e TZ=Asia/Seoul \
-d postgres:latestDocker로 PostgreSQL 설치|🔝|
docker run --name {name-of-container} -v {name-of-volume}:{volume-storage-location} -p {desired-port}:5432 -e POSTGRES_PASSWORD={desired-password} -d {desired-postgres-image}
docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=1q2w3e4r -d postgres
docker exec -it postgres /bin/bash
root@ac61c662ee4c:/# psql -U postgres
psql (13.0 (Debian 13.0-1.pgdg100+1))
Type "help" for help.
postgres=# CREATE USER seongwon PASSWORD '1q2w3e4r' SUPERUSER;
CREATE ROLE
postgres=# CREATE DATABASE test OWNER seongwon;
CREATE DATABASE
postgres=# \c test seongwon
You are now connected to database "test" as user "seongwon".
test=# CREATE TABLE star (
id integer NOT NULL,
name character varying(255),
class character varying(32),
age integer,
radius integer,
lum integer,
magnt integer,
CONSTRAINT star_pk PRIMARY KEY (id)
);
CREATE TABLE
test=# \dt
List of relations
Schema | Name | Type | Owner
--------+------+-------+----------
public | star | table | seongwon
(1 row)
PostgreSQL에 sql파일 넣기|🔝|
psql -h localhost -d userstoreis -U admin -p 5432 -a -q -f /home/jobs/Desktop/resources/postgresql.sql
-h PostgreSQL server IP address
-d database name
-U user name
-p port which PostgreSQL server is listening on
-f path to SQL script
-a all echo
-q quiet
-f file
export PGPASSWORD=<password>
psql -h <host> -d <database> -U <user_name> -p <port> -a -w -f <file>.sql
PostgreSQL 설치 위치(/bin/psql)|🔝|
psql --version
which psql
Mine is version 9.1.6 located in /bin/psql.
SQL명령어 그림으로 이해하기|🔝|
- 출처 : https://www.instagram.com/reel/DBrYJ_EhGku/?igsh=MWdwY2htemZ1b2xs
- fork link: https://economiceco.tistory.com/19642
SQL Databases vs NoSQL Databases|🔝|
| SQL Databases | NoSQL Databases |
|---|---|
| 1. PostgreSQL 2. MySQL 3. SQLite 4. SQL Server 5. Oracle 6. CockroachDB |
1. Mongo DB 2. Redis 3. ElasticSearch 4. Firebase 5. Dynamo DB |
PostgreSQL|🔝|
- ebook
- https://www.postgresqltutorial.com/
- Tutorial모음
- Learning SQL from scratch 🔴 PostgreSQL Live #1 | Xkonti
- PostgreSQL Tutorial for Beginners | freeCodeCamp.org
- (220929)PostgreSQL Tutorial Full Course 2022 | Derek Banas
- 🐘 Hazel Bachrach라는 개발자가 Postgres에 대해 미리 알았더라면 좋았을 것들을 모아 정리했음. 공식 문서가 A4용지로 무려 3,200 페이지에 달하기 때문에 주니어 개발자에게는 굉장히 부담스러울 수밖에 없다고. 😱 데이터 정규화, psql 활용도 높이기, 인덱스 작동 방식, JSONB 사용 시 주의사항 등에 대해 적혀 있다. 물론 우리에게는 니꼬쌤의 SQL 강의가 있으니 안심해도 좋음!What I Wish Someone Told Me About Postgres Nov 11, 2024
- 다른 Tutorial MySQL인듯
- Database Engineering Complete Course | DBMS Complete Course | Nerd's lesson
(230824)SQL For Web Developers - Complete Database Course | freeCodeCamp.org|🔝|
SQL for Data Analytics - Learn SQL in 4 Hours | Luke Barousse|🔝|
- https://youtu.be/7mz73uXD9DA?si=kKUsGBc8lKkEC6c2
- VSCode로 PostgreSQL에 연결해서 연습하기
(241009)Databases In-Depth – Complete Course | freeCodeCamp.org|🔝|
macOS(Path)|🔝|
If you need to have libpq first in your PATH, run:
fish_add_path /opt/homebrew/opt/libpq/bin
For compilers to find libpq you may need to set:
set -gx LDFLAGS "-L/opt/homebrew/opt/libpq/lib"
set -gx CPPFLAGS "-I/opt/homebrew/opt/libpq/include"
For pkg-config to find libpq you may need to set:
set -gx PKG_CONFIG_PATH "/opt/homebrew/opt/libpq/lib/pkgconfig"