title
stringlengths 1
544
⌀ | parent
stringlengths 0
57
⌀ | created
stringlengths 11
12
⌀ | editor
stringclasses 1
value | creator
stringclasses 4
values | edited
stringlengths 11
12
⌀ | refs
stringlengths 0
536
⌀ | text
stringlengths 1
26k
| id
stringlengths 32
32
|
---|---|---|---|---|---|---|---|---|
postgis topology
|
Postgis Usage
|
Dec 3, 2019
| null | null | null |
> [Chapter 11. Topology](https://postgis.net/docs/Topology.html)
|
bd8b9b845b56454f8701f04dcb4f7e65
|
|
postgis_sfcgal
|
Postgis Usage
|
Jul 22, 2021
| null | null | null |
5261248708ca4312926c35e420bc0fa5
|
||
PostGIS_Version()
|
Postgis Function
| null | null | null | null | null |
> [PostGIS_Version](https://postgis.net/docs/PostGIS_Version.html)
|
a40df56a2f7042f7a7ff0c5af371c3cd
|
ST_3DIntersects()
|
Postgis Function
| null | null | null | null | null |
a8ddab5e0b154edaaf674db5ff6954b5
|
|
ST_AsText
|
Postgis Function
| null | null | null | null | null |
04267d0e46fb4745b77e6ff10f47b432
|
|
ST_Buffer()
|
Postgis Function
| null | null | null | null | null |
> [ST_Buffer](https://postgis.net/docs/ST_Buffer.html)
|
d623a243cf1a471695627d7b82502876
|
ST_Difference()
|
Postgis Function
| null | null | null | null | null |
202a1b8de8aa4e6ca71498601db869f6
|
|
ST_Extrude()
|
Postgis Function
| null | null | null | null | null |
need
```typeCREATE EXTENSION postgis_sfcgal;```
> [ST_Extrude](https://postgis.net/docs/ST_Extrude.html)
|
03cbd3a2180a4734af0cbcf0c7b6abc9
|
ST_GeomFromText()
|
Postgis Function
| null | null | null | null | null |
afa0b158293a474ba75ddca64b27bb8e
|
|
ST_Intersects()
|
Postgis Function
| null | null | null | null | null |
655625c6a2514ea88886ae90f8626dc3
|
|
ST_IsValid()
|
Postgis Function
| null | null | null | null | null |
```typeselect id, ST_isvalid(geom) from facilities where ST_isvalid(geom) is null;delete from facilities where ST_isvalid(geom) is null;```
```typeselect id, ST_isvalid(geom) from facilities where ST_isvalid(ST_CurveToLine(geom)) is false;delete from facilities where ST_isvalid(ST_CurveToLine(geom)) is false;```
|
cd742491bef340fcb0916331e4e882b2
|
ST_IsValidReason()
|
Postgis Function
| null | null | null | null | null |
b8de884b02d6468b9723f7411b0d799b
|
|
ST_MakeEnvelope()
|
Postgis Function
| null | null | null | null | null |
2a107cbaa80645d396bcab88b9be6a26
|
|
Docker Postgis
|
Postgis Install
| null | null | null | null | null |
```typedocker exec -it pgsql bashnano /etc/postgresql/9.5/main/postgresql.confnano /docker-entrypoint-initdb.d/init-user-db.sh```
> [Docker Postgresql 설치 및 셋팅하기](https://judo0179.tistory.com/48)
|
8728c597431a46afa3f07d76757a8326
|
plrust
|
postgres function Usages
|
Apr 11, 2023
|
Alan Jo
|
Alan Jo
|
Apr 11, 2023
| null |
[plrust](https://github.com/tcdi/plrust)
|
927c66b6595649378f7d8c1a117f79eb
|
Postgre Function
|
Postgres Components
|
Mar 23, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
### Postgre Functions
|Title|
|:-:|
|[Postgre Now()](https://texonom.com/postgre-now-7ffe363a3a084b53b6466036598c4f05)|
|[Postgre pg_database_size](https://texonom.com/postgre-pgdatabasesize-993d30d2975548099560edb46c29f2b8)|
|
4fce1d892d3e4b63a2bedfae3e3dbd10
|
|
Postgre Rules
|
Postgres Components
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Mar 23, 2021
|
[Postgre instead](https://texonom.com/postgre-instead-e250fec95737415d89350ec22ef5e0b7)
|
2ae913194df640d89dfa000bd246a26b
|
|
Postgre Table
|
Postgres Components
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
### Postgres Tables
|Title|
|:-:|
|[PG information_schema](https://texonom.com/pg-informationschema-9098237123d44c72a7abfc59515c4133)|
|[PG pg_stat_activity](https://texonom.com/pg-pgstatactivity-40812ee2ea7d4ab4a101d198363a421a)|
```typeCREATE TABLE test(jsb jsonb, id uuid NOT NULL PRIMARY KEY, geom geometry);```
|
cf015306f7ef43eab9d1d6c2c83c33b7
|
|
Postgre View
|
Postgres Components
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
May 30, 2022
|
```typeselect * from pg_views```
```typecreate view test_line as select id, jsb, geom::geometry(LineString, 4326)from testwhere geometryType(geom) = 'LINESTRING';```
### qgis editable view
> [Error editing 'editable' view in QGIS](https://gis.stackexchange.com/questions/201181/error-editing-editable-view-in-qgis)
> [How to render mixed geometry from one table?](https://gis.stackexchange.com/questions/194503/how-to-render-mixed-geometry-from-one-table)
|
d6cece454e52465e9459c9f3d2e6bc5c
|
|
Postgres Column
|
Postgres Components
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
Aug 11, 2022
|
### add
```typealter table table_name add column column_name type_name default default_value```
### rename
```typeALTER TABLE table_name RENAME COLUMN column_name TO column_name```
### drop
```typeALTER TABLE table_name drop COLUMN column_name```
|
7b92022b65bc4d87be120d8ae2c11d8f
|
|
Postgres ****Constraints****
|
Postgres Components
|
Apr 13, 2022
|
Alan Jo
|
Alan Jo
|
Mar 11, 2023
|
```typeALTER TABLE public.reservationsADD CONSTRAINT reservations_room_id_fkeyFOREIGN KEY (room_id) REFERENCES public.rooms(id);ALTER TABLE public.reservations ADD CONSTRAINT reservations_user_id_fkeyFOREIGN KEY (user_id) REFERENCES public.users(id);```
```typeALTER TABLE public.reservationsADD CONSTRAINT daytime_check check (start_time::time >= '08:00:00'AND end_time::time <= '17:00:00')```
### **Constraints**
> [Postgres Constraints for Newbies](https://blog.crunchydata.com/blog/postgres-constraints-for-newbies)
|
e3e853cf08e84ccea2acb0d4ab624589
|
|
Postgres Data Type
|
Postgres Components
|
Apr 13, 2022
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
[wrappers](https://github.com/supabase/wrappers)
|
### Postgres Data Types
|Title|
|:-:|
|[Postgres Multiranges](https://texonom.com/postgres-multiranges-a5e801b3ee4e4db98065a058eb28b80b)|
|[Postgre string](https://texonom.com/postgre-string-3777136f474b4e058d6b4776637f51f4)|
|[Postgres JSON JSONB](https://texonom.com/postgres-json-jsonb-0a778c97c1b44bff83697764a432b9b9)|
|[Postgre UUID](https://texonom.com/postgre-uuid-d5b66f4659f44e4ba89ba14a4c907513)|
|[Postgre Timestamp](https://texonom.com/postgre-timestamp-7dafd2e4157e4f299691bf38a47ecd62)|
|[Postgre TimestampTZ](https://texonom.com/postgre-timestamptz-568876c3c3064af5b77bd5910c13ba33)|
|[Postgres Vector](https://texonom.com/postgres-vector-b70f9c7db0d74493ade061b0ae5cc09b)|
> [Data Types](https://www.postgresql.org/docs/9.5/datatype.html)
|
0d0263d27f3e4e4992d970f7dcfb1af9
|
Postgres Database
|
Postgres Components
|
Mar 1, 2020
|
Alan Jo
|
Alan Jo
|
Aug 10, 2022
|
```typeREVOKE CONNECT ON DATABASE thedb FROM public;DROP DATABASE mms;CREATE DATABASE mms;OWNER = role_name```
```typeCREATE DATABASE db_nameOWNER = role_nameTEMPLATE = template ENCODING = encoding LC_COLLATE = collate LC_CTYPE = ctypeTABLESPACE = tablespace_nameCONNECTION LIMIT = max_concurrent_connection```
### copy
- connection 있을때 안되서 [pg_dump](https://texonom.com/pgdump-2c85cd5d072149289b1df14b3db66687) 이용이 편함
```typeSELECT pid, usename, client_addr FROM pg_stat_activity WHERE datname ='';SELECT pg_terminate_backend (pid)FROM pg_stat_activityWHERE datname = '';CREATE DATABASE mms_test WITH TEMPLATE mms;```
### Drop
connect to that db
```typeSELECT pid, pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = current_database() AND pid <> pg_backend_pid();```
> [Postgresql - unable to drop database because of some auto connections to DB](https://stackoverflow.com/questions/17449420/postgresql-unable-to-drop-database-because-of-some-auto-connections-to-db)
> [PostgreSQL Copy Database Made Easy](https://www.postgresqltutorial.com/postgresql-copy-database/)
> [PostgreSQL CREATE DATABASE with Example](https://www.guru99.com/postgresql-create-database.html)
> [PostgreSQL Copy Database Made Easy](https://www.postgresqltutorial.com/postgresql-copy-database/)
|
2b4c9d5cfebe4bbc82000b93513a9dbe
|
|
Postgres Reindex
|
Postgres Components
|
Oct 12, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
[Postgres Vacuum](https://texonom.com/postgres-vacuum-1734ee2ce2ac461cac73ce5326c38366)
```typereindex database mms```
> [REINDEX](https://runebook.dev/ko/docs/postgresql/sql-reindex)
|
a92950533843403aba8f734dfc51225f
|
|
Postgres Role
|
Postgres Components
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
### `role` is `group`
- rolsuper
- rolinherit
- rolcreaterole
- rolcreatedb
- rolcanlogin
- rolreplication
- rolconnlimit
- rolpassword
- rolvaliduntil
- rolbypassrls
- rolconfig
- oid
### Postgres Role Notion
|Title|
|:-:|
|[PostgreSQL User](https://texonom.com/postgresql-user-442197fed92b49b2bdabeb2cf9e94365)|
```typeSELECT * FROM pg_roles ;```
```typecreate role admin superuser;create role viewer;```
> [how can I create role groups in postgresql](https://stackoverflow.com/questions/47788441/how-can-i-create-role-groups-in-postgresql)
|
452b79e15f0945c88da0469ceed2fd2c
|
|
Postgres Schema
|
Postgres Components
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
408e39ccc56942e782c28eaee02284ff
|
||
Postgres Vacuum
|
Postgres Components
|
Mar 1, 2020
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
```type-- DB 전체 풀 실행vacuum full analyze;-- DB 전체 간단하게 실행vacuum verbose analyze;-- 해당 테이블만 간단하게 실행vacuum analyse [테이블 명];-- 특정 테이블만 풀 실행vacuum full [테이블명];```
[Postgres autovacuum](https://texonom.com/postgres-autovacuum-f14e119ec11a4768aa58e123fe8f1298)
> [PostgreSQL: 베큠(VACUUM)을 실행해야되는 이유 그리고 성능 향상](https://blog.gaerae.com/2015/09/postgresql-vacuum-fsm.html)
> [[DB] Vacuum과 Autovacuum이란?](https://link.medium.com/bnrAiV1xOnb)
|
1734ee2ce2ac461cac73ce5326c38366
|
|
PostgreSQL Revoke
|
Postgres Components
|
Jan 5, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
```typeREVOKE ALL PRIVILEGES ON tableorview FROM roleoruser;```
> [REVOKE](https://www.postgresql.org/docs/9.1/sql-revoke.html)
|
264394e8d4ba498ca6639444d0588585
|
|
PostgreSQL Tablespace
|
Postgres Components
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
> [Tablespaces](https://www.postgresql.org/docs/9.3/manage-ag-tablespaces.html)
|
16614f3108d64f07a87c8c0bc585d11e
|
|
Postgre Now()
|
Postgre Functions
|
Dec 28, 2020
|
Alan Jo
|
Alan Jo
|
Mar 23, 2021
|
> [PostgreSQL NOW Function](https://www.postgresqltutorial.com/postgresql-now/)
|
7ffe363a3a084b53b6466036598c4f05
|
|
Postgre pg_database_size
|
Postgre Functions
|
Oct 19, 2021
|
Alan Jo
|
Alan Jo
|
Oct 19, 2021
|
바이트 수를 사람이 읽을 수 있는 형식으로 변환
- `SELECT pg_size_pretty(pg_database_size('mydb'))` : mydb 데이터베이스 용량 확인
- `SELECT pg_size_pretty(pg_relation_size('mytable'))` : mytable 테이블 사이즈 계산
- SELECT pg_size_pretty(pg_index_size('mytable')) : mytable의 인덱스 크기를 계산
- SELECT pg_size_pretty(pg_total_relation_size('mytable')) : mytable 테이블 사이즈 체크시 연관된 인덱스 사이즈 까지 합산
> [Postgresql db, table 용량 확인](https://codereader37.tistory.com/108)
|
993d30d2975548099560edb46c29f2b8
|
|
Postgre instead
|
Postgre Rules
| null | null | null | null | null |
```type--delete rulecreate or replace rule "delete_label" as on delete to schools_district_map do insteaddelete from temp_schools_label where oid = old.oid;--insert rulecreate or replace rule "insert_label" as on insert to schools_district_map do insteadinsert into district_map_labels (label_x, label_y)values (new.label_x, new.label_y);--update rulecreate or replace rule "labels_update" as on UPDATE TO schools_district_map do instead update district_map_labels set *label_x = new.label_x,label_y = new.label_y*where oid = new.oid;```
### postgis
```type--delete rulecreate or replace rule "delete_test_line" as on delete to test_line do insteaddelete from test where id = old.id;--insert rulecreate or replace rule "insert_test_line" as on insert to test_line do insteadinsert into test (id, jsb, geom)values (new.id, new.jsb, new.geom)RETURNING id, jsb, geom;--update rulecreate or replace rule "update_test_line" as on UPDATE TO test_line do instead update test set jsb = new.jsb,geom = new.geom::geometrywhere id = new.id;```
```typedrop rule rulename on tablename```
> [Error editing 'editable' view in QGIS](https://gis.stackexchange.com/questions/201181/error-editing-editable-view-in-qgis)
> [DROP RULE](https://www.postgresql.org/docs/9.2/sql-droprule.html)
|
e250fec95737415d89350ec22ef5e0b7
|
PG information_schema
|
Postgres Tables
|
Jan 5, 2021
|
Alan Jo
|
Alan Jo
|
Apr 7, 2021
|
### check table authority
```typeSELECT table_catalog, table_schema, table_name, privilege_typeFROM information_schema.table_privileges WHERE grantee = 'MY_USER'```
> [Check Postgres access for a user](https://stackoverflow.com/questions/26917508/check-postgres-access-for-a-user/26917620)
|
9098237123d44c72a7abfc59515c4133
|
|
PG pg_stat_activity
|
Postgres Tables
|
Apr 7, 2021
|
Alan Jo
|
Alan Jo
|
Apr 7, 2021
|
### check all connection
```typeselect *from pg_stat_activitywhere datname = 'mydatabasename';```
> [How to see active connections and "current activity" in PostgreSQL 8.4](https://serverfault.com/questions/128284/how-to-see-active-connections-and-current-activity-in-postgresql-8-4)
|
40812ee2ea7d4ab4a101d198363a421a
|
|
Postgre `string`
|
Postgres Data Types
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
3777136f474b4e058d6b4776637f51f4
|
||
Postgre Timestamp
|
Postgres Data Types
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
7dafd2e4157e4f299691bf38a47ecd62
|
||
Postgre TimestampTZ
|
Postgres Data Types
|
Jan 5, 2021
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
568876c3c3064af5b77bd5910c13ba33
|
||
Postgre UUID
|
Postgres Data Types
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
d5b66f4659f44e4ba89ba14a4c907513
|
||
Postgres JSON JSONB
|
Postgres Data Types
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
The JSON data type in PostgreSQL stores the value as plain text, as opposed to binary representation. If you simply want to store and retrieve a JSON representation, using JSON will take less disk space and less time to build from its input representation. However, if you want to do any operations on the JSON value, you should prefer the JSONB data type described below
### just use jsonb
[Postgres JSON](https://texonom.com/postgres-json-4aaaaae032b347efadcb1a31db84d96a)
[Postgres JSONB](https://texonom.com/postgres-jsonb-4471384dac6f48bcbad7d5ff9c0a92b9)
|
0a778c97c1b44bff83697764a432b9b9
|
|
Postgres Multiranges
|
Postgres Data Types
|
Apr 13, 2022
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
> [Multiranges in PostgreSQL 14 - | CYBERTEC Data Science & PostgreSQL](https://www.cybertec-postgresql.com/en/multiranges-in-postgresql-14)
|
a5e801b3ee4e4db98065a058eb28b80b
|
|
Postgres Vector
|
Postgres Data Types
|
Jun 27, 2023
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
[Vector Database](https://texonom.com/vector-database-5dfdb6e2bc294fed8ae80eaea2ee5c26)
|
### Postgres Vector Usages
|Title|
|:-:|
|[pgvector](https://texonom.com/pgvector-7b01418ad9b04ff898df2dec6a5d4af3)|
> [Vectors are the new JSON in PostgreSQL](https://jkatz05.com/post/postgres/vectors-json-postgresql/)
|
b70f9c7db0d74493ade061b0ae5cc09b
|
Postgres JSON
|
Postgres JSON JSONB
| null | null | null | null | null |
## PostgreSQL documentation recommends usage of jsonb
Validation Extension - [pg_jsonschema](https://github.com/supabase/pg_jsonschema)
[Postgre JSON Functions](https://texonom.com/postgre-json-functions-c3c6dd060b1047d490c135bc3018985a)
[PostgreSQL JSON Update](https://texonom.com/postgresql-json-update-b63bf407df294ced9a60316c04726617)
[Geoserver PostGIs JsonPointer](https://texonom.com/geoserver-postgis-jsonpointer-344b5610831c4faeaa9501e09e3dfe1b)
### add json column
```typeALTER TABLE table ADD COLUMN "jsisonb" jsonb not null default '{"datas": [{},{}]}';ALTER TABLE table ADD COLUMN "jeison" json not null default '{"datas": [{},{}]}'::jsonb;```
```typeSELECT jsonb->'datas' FROM table;```
### remove column
```typeALTER TABLE "table" DROP COLUMN "jeison"```
> [postgresql: how to define a JSONB column with default value](https://dba.stackexchange.com/questions/207019/postgresql-how-to-define-a-jsonb-column-with-default-value)
> [Postgresql JSON 데이터 타입 handling](https://sas-study.tistory.com/268)
> [Untitled](https://info.enterprisedb.com/rs/enterprisedb/images/EDB_White_Paper_Using_the_NoSQL_Features_in_Postgres.pdf)
### size limit
- 255mb jsonb
- 1gb json (text)
> [Size limit of JSON data type in PostgreSQL](https://stackoverflow.com/questions/12632871/size-limit-of-json-data-type-in-postgresql)
|
4aaaaae032b347efadcb1a31db84d96a
|
Postgres JSONB
|
Postgres JSON JSONB
| null | null | null | null | null |
[Postgre JSONB Array](https://texonom.com/postgre-jsonb-array-ae1274a806d9447480ed45e16ce83dea)
[PostgreSQL jsonb_set](https://texonom.com/postgresql-jsonbset-aebe4cd370f441b48c995aacaf5113b6)
[Postgre jsonb_build_object](https://texonom.com/postgre-jsonbbuildobject-0dfae25cd5ea4367aa1e0be6cd8e7ac3)
[Postgre jsonb_object_keys](https://texonom.com/postgre-jsonbobjectkeys-140f399b933f4a97b94954b7989ee123)
[jsquery](https://texonom.com/jsquery-f4b8af9c942d4fc5ba3fb1b47c11593a)
### Operators and functions
> [JSON Functions and Operators](https://www.postgresql.org/docs/9.6/functions-json.html)
### From string to jsonb
> [Updating a column from a varchar to jsonb](https://stackoverflow.com/questions/49710935/updating-a-column-from-a-varchar-to-jsonb)
|
4471384dac6f48bcbad7d5ff9c0a92b9
|
Postgre JSON Functions
|
Postgres JSON
| null | null | null | null | null |
[Postgre json_typeof](https://texonom.com/postgre-jsontypeof-6c3195708ede4b46af4aeb490f6d033a)
[PostgreSQL json_object_keys](https://texonom.com/postgresql-jsonobjectkeys-5ef02c51917a4b54bfdce8de237c663a)
> [Postgresql JSON 데이터 타입 handling](https://sas-study.tistory.com/268)
|
c3c6dd060b1047d490c135bc3018985a
|
PostgreSQL JSON Update
|
Postgres JSON
| null | null | null | null | null |
{a : b}
a key만 업데이트 되거나 추가되고, 있던 키들은 그대로
```typeupdate "testGroup".teststudentinfo set "stuInfo" = "stuInfo"::jsonb || '{"major" : "통계학과"}' where "stuInfo"->>'major' = '수학과';```
> [[DB] postgreSQL json - update 하기](https://minaminaworld.tistory.com/135)
|
b63bf407df294ced9a60316c04726617
|
Postgre json_typeof
|
Postgre JSON Functions
| null | null | null | null | null |
- number
- object
|
6c3195708ede4b46af4aeb490f6d033a
|
PostgreSQL json_object_keys
|
Postgre JSON Functions
| null | null | null | null | null |
5ef02c51917a4b54bfdce8de237c663a
|
|
jsquery
|
Postgres JSONB
| null | null | null | null | null |
[jsquery](https://github.com/postgrespro/jsquery)
|
f4b8af9c942d4fc5ba3fb1b47c11593a
|
Postgre JSONB Array
|
Postgres JSONB
| null | null | null | null | null |
### append
```typeUPDATE jsontestingSET jsondata = jsondata || '["newString"]'::jsonbWHERE id = 7;```
### remove
```typeUPDATE jsontestingSET jsondata = jsondata - "newString"WHERE id = 7;```
### nested append
```typeUPDATE jsontestingSET jsondata = jsonb_set( jsondata::jsonb, array['nestedfield'], (jsondata->'nestedfield')::jsonb || '["newString"]'::jsonb) WHERE id = 7;```
### Splice by index
```typeUPDATE ${table} SET ${col} = ${col} - ( SELECT i FROM generate_series(0, jsonb_array_length(${col}) - 1) AS i WHERE (${col}->i->'id' = '"${id}"') )WHERE ${table}.id = '${where}'::uuid```
### Splice by index of object array
> [https://itectec.com/database/postgresql-delete-an-object-from-within-an-array-using-jsonb-in-postgresql/](https://itectec.com/database/postgresql-delete-an-object-from-within-an-array-using-jsonb-in-postgresql/)
### Append and remove simple
> [Appending (pushing) and removing from a JSON array in PostgreSQL 9.5+](https://stackoverflow.com/questions/42233542/appending-pushing-and-removing-from-a-json-array-in-postgresql-9-5)
|
ae1274a806d9447480ed45e16ce83dea
|
Postgre jsonb_build_object
|
Postgres JSONB
| null | null | null | null | null |
0dfae25cd5ea4367aa1e0be6cd8e7ac3
|
|
Postgre jsonb_object_keys
|
Postgres JSONB
| null | null | null | null | null |
```typeselect jsonb_object_keys(property->'etri') as key from facilities group by key;```
|
140f399b933f4a97b94954b7989ee123
|
PostgreSQL jsonb_set
|
Postgres JSONB
| null | null | null | null | null |
return jsonb
```typeproperty=jsonb_set(property, 'ngii', new.property)```
|
aebe4cd370f441b48c995aacaf5113b6
|
pgvector
|
Postgres Vector Usages
|
Jun 27, 2023
|
Alan Jo
|
Alan Jo
|
Jun 27, 2023
|
[pgvector](https://github.com/pgvector/pgvector)
|
7b01418ad9b04ff898df2dec6a5d4af3
|
|
PostgreSQL User
|
Postgres Role Notion
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
### PostgreSQL User Configs
|Title|
|:-:|
|[PostgreSQL User username](https://texonom.com/postgresql-user-username-96e37fd76f3041eb9360b6e63673a768)|
|[PostgreSQL User usesysid](https://texonom.com/postgresql-user-usesysid-c2675642d5214a699adb04ff92b03fc1)|
|[PostgreSQL User usercreatedb](https://texonom.com/postgresql-user-usercreatedb-3235b36009c34d35871e5500d049d1d3)|
|[PostgreSQL User usesuper](https://texonom.com/postgresql-user-usesuper-3414a0726bcf4661919cd4f0a577cf52)|
|[PostgreSQL User userepl](https://texonom.com/postgresql-user-userepl-d0130daf1fbc49b6bb5c36974abda18d)|
|[PostgreSQL User usebypassrls](https://texonom.com/postgresql-user-usebypassrls-814a57c323fb42c58516772522382e35)|
|[PostgreSQL User passwd](https://texonom.com/postgresql-user-passwd-d825d288e606413dbb2bb925530fd1f8)|
|[PostgreSQL User valuntil](https://texonom.com/postgresql-user-valuntil-663c1395ac7c4925afae0fc4c0fed368)|
|[PostgreSQL User useconfig](https://texonom.com/postgresql-user-useconfig-53e614c7e13c481095cc50ef404122d5)|
### PostgreSQL User Usages
|Title|
|:-:|
|[PostgreSQL User Create](https://texonom.com/postgresql-user-create-933f47ffde95481388287790516081b1)|
|[PostgreSQL User Grant](https://texonom.com/postgresql-user-grant-64dbbf8fecb24ccdbb3287901a4ec88c)|
|[PostgreSQL User Drop](https://texonom.com/postgresql-user-drop-6d3176c07fa54c95883d123392d6e11d)|
|
442197fed92b49b2bdabeb2cf9e94365
|
|
PostgreSQL User passwd
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
d825d288e606413dbb2bb925530fd1f8
|
||
PostgreSQL User usebypassrls
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
814a57c323fb42c58516772522382e35
|
||
PostgreSQL User useconfig
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
53e614c7e13c481095cc50ef404122d5
|
||
PostgreSQL User usercreatedb
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
3235b36009c34d35871e5500d049d1d3
|
||
PostgreSQL User userepl
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
d0130daf1fbc49b6bb5c36974abda18d
|
||
PostgreSQL User username
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
96e37fd76f3041eb9360b6e63673a768
|
||
PostgreSQL User usesuper
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
3414a0726bcf4661919cd4f0a577cf52
|
||
PostgreSQL User usesysid
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
c2675642d5214a699adb04ff92b03fc1
|
||
PostgreSQL User valuntil
|
PostgreSQL User Configs
|
Dec 11, 2020
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
663c1395ac7c4925afae0fc4c0fed368
|
||
PostgreSQL User Create
|
PostgreSQL User Usages
|
May 30, 2022
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
```typeSELECT *FROM pg_user;```
```typecreate user blabla password 'blabla'```
> [CREATE USER](https://www.postgresql.org/docs/8.0/sql-createuser.html)
|
933f47ffde95481388287790516081b1
|
|
PostgreSQL User Drop
|
PostgreSQL User Usages
|
May 30, 2022
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
```typeREASSIGN OWNED BY ryan TO postgres; -- or some other trusted roleDROP OWNED BY ryan;```
> [Cannot drop PostgreSQL role. Error: `cannot be dropped because some objects depend on it`](https://stackoverflow.com/questions/51256454/cannot-drop-postgresql-role-error-cannot-be-dropped-because-some-objects-depe)
|
6d3176c07fa54c95883d123392d6e11d
|
|
PostgreSQL User Grant
|
PostgreSQL User Usages
|
May 30, 2022
|
Alan Jo
|
Alan Jo
|
Apr 16, 2023
|
### grant useruser
```typealter user username with superuser```
### grant role
```typeGRANT permissions TO username;```
|
64dbbf8fecb24ccdbb3287901a4ec88c
|
|
Postgres autovacuum
|
Postgres Vacuum
| null | null | null | null | null |
```typeSHOW autovacuum;```
```typeSELECT relname, n_live_tup, n_dead_tup, n_dead_tup / (n_live_tup::float) as ratioFROM pg_stat_user_tablesWHERE n_live_tup > 0 AND n_dead_tup > 1000ORDER BY ratio DESC;```
각 테이블 별로 Autovacuum 이 마지막에 실행된 시각
```typeSELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyzeFROM pg_stat_user_tablesORDER BY relname asc;```
### tune table
```typeALTER TABLE spatial_ref_sys SET (autovacuum_vacuum_scale_factor = 0.0);ALTER TABLE spatial_ref_sys SET (autovacuum_vacuum_threshold = 100000);ALTER TABLE spatial_ref_sys SET (autovacuum_vacuum_cost_limit = 1000);```
> [PostgreSQL 튜닝 - Autovacuum 최적화에 대하여](https://nrise.github.io/posts/postgresql-autovacuum/)
|
f14e119ec11a4768aa58e123fe8f1298
|
Postgres 15
|
Postgres Versions
|
Jul 12, 2022
|
Alan Jo
|
Alan Jo
|
Jan 15, 2023
| null |
> [PostgreSQL 15 Released!](https://www.postgresql.org/about/news/postgresql-15-released-2526/)
> [Postgres 15 improves UNIQUE and NULL](https://blog.rustprooflabs.com/2022/07/postgres-15-unique-improvement-with-null)
|
3dca46cec8f64192b0cad7d92f009090
|
DBDev
|
Postgres Usages
|
Apr 17, 2023
|
Alan Jo
|
Alan Jo
|
Apr 17, 2023
|
[dbdev](https://github.com/supabase/dbdev) [PostgreSQL Trusted Language Extensions](https://texonom.com/postgresql-trusted-language-extensions-51b1e31154e14a8ba87c49f30aacb1a2)
|
### package manager for PostgreSQL
### DBDev Usages
|Title|
|:-:|
> [dbdev | The Database Package Manager](https://database.dev/)
|
e82441e22c8d448fbfeed1aa9b382a1b
|
Postgre Backup
|
Postgres Usages
|
Oct 19, 2021
|
Alan Jo
|
Alan Jo
|
Oct 19, 2021
|
### Postgre Backups
|Title|
|:-:|
|[Postgre Archive Mode](https://texonom.com/postgre-archive-mode-ae13aac57d6742c7822896930137b8a3)|
|
c2adeeba2c464e73a618b43bd999fccc
|
|
Postgres Container
|
Postgres Usages
|
Apr 13, 2022
|
Alan Jo
|
Alan Jo
|
Jul 17, 2023
|
[Superbase Postgres](https://texonom.com/superbase-postgres-d22f26852b33430facc742c344b2551f) [postgres-wasm](https://github.com/snaplet/postgres-wasm) [docker-pgautoupgrade](https://github.com/justinclift/docker-pgautoupgrade)
|
### Postgres Container Usages
|Title|
|:-:|
|[Postgre Kubernetes](https://texonom.com/postgre-kubernetes-f044a18214ae4dcc8c59f1bf7f4ed4f3)|
|
71ee870182164039bcb37daff56ac3b9
|
Postgres Optimization
|
Postgres Usages
|
Apr 13, 2022
|
Alan Jo
|
Alan Jo
|
Apr 30, 2023
|
[pgbench](https://texonom.com/pgbench-5af710dd4b414914a43ebaab872e7b8a) [Postgres Reindex](https://texonom.com/postgres-reindex-a92950533843403aba8f734dfc51225f) [PostgreSQL Revoke](https://texonom.com/postgresql-revoke-264394e8d4ba498ca6639444d0588585) [Postgres Vacuum](https://texonom.com/postgres-vacuum-1734ee2ce2ac461cac73ce5326c38366)
|
### `work_mem`
> [Nine ways to shoot yourself in the foot with PostgreSQL](https://philbooth.me/blog/nine-ways-to-shoot-yourself-in-the-foot-with-postgresql)
### PGTune
> [PGTune - calculate configuration for PostgreSQL based on the maximum performance for a given hardware configuration](https://pgtune.leopard.in.ua/#/)
### Performance Tips
> [Performance Tips](https://www.postgresql.org/docs/9.3/performance-tips.html)
### Query Optimization
> [Five Easy to Miss PostgreSQL Query Performance Bottlenecks](https://pawelurbanek.com/postgresql-query-bottleneck)
|
d5012b5593b741c4a5050cb173ed28a4
|
Postgres Tool
|
Postgres Usages
|
Jan 9, 2022
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
### Postgres Tools
|Title|
|:-:|
|[Postgres GUI](https://texonom.com/postgres-gui-03c7343744fd4e638a6a95ff74b9c7e6)|
|[Postgres CLI](https://texonom.com/postgres-cli-b43be7330e574f6288cc56f1a38d6cca)|
|[Postgres Meta](https://texonom.com/postgres-meta-29aca4891a974effa2c10caa08956a29)|
|[PostgREST](https://texonom.com/postgrest-cefd3885982c4fe7a950786c5b29c2f7)|
|[PG Strom](https://texonom.com/pg-strom-0f0cfe801d9c4c6393b8d54931bf54ee)|
|[AppOS](https://texonom.com/appos-ef198b64216145e5af9f46f0dfc47005)|
|[pg_graphql](https://texonom.com/pggraphql-907a10ba62ae4fc28f99d12ff61e15fc)|
|[PostgreSQL connection pooler](https://texonom.com/postgresql-connection-pooler-15a39abc74044affb65a860ba4e24292)|
|[gimbop](https://texonom.com/gimbop-88ae5223bc064edf880854514fd42210)|
|[pgbench](https://texonom.com/pgbench-5af710dd4b414914a43ebaab872e7b8a)|
|
9a3f9d4bab3c47b493ae3ff8230536a3
|
|
PostgreSQL Error
|
Postgres Usages
|
May 7, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
### PostgreSQL Errors
|Title|
|:-:|
|[Postgresql not connect to server: Connection refused](https://texonom.com/postgresql-not-connect-to-server-connection-refused-da1c8b9e025c4befa0f43224e5788c1e)|
|
ace4b57eef624118839406008650dfc8
|
|
PostgreSQL Sharding
|
Postgres Usages
|
Dec 8, 2020
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
기본적 오픈소스 지원안함
[citus](https://texonom.com/citus-983116894df246c89990b754dd8ff4a3)
> [[PostgreSQL] Citus를 활용한 DB 샤딩(sharding)의 구현](https://blog.naver.com/PostView.nhn?blogId=sehyunfa&logNo=221870917657&categoryNo=93&parentCategoryNo=0&viewDate=¤tPage=1&postListTopCurrentPage=1&from=postView)
> [Sharding with PostgreSQL - Blog dbi services](https://blog.dbi-services.com/sharding-with-postgresql/)
|
cf4791cabc914cc2b8ca14847742ac2c
|
|
Postgre Archive Mode
|
Postgre Backups
|
Oct 19, 2021
|
Alan Jo
|
Alan Jo
|
Oct 19, 2021
| null |
모드 활성화 conf
> [PostgreSQL Documentation: archive_mode parameter](https://postgresqlco.nf/doc/en/param/archive_mode/)
> [Untitled](https://rastalion.me/415/)
> [[PostgreSQL] PostgreSQL 아카이브 백업과 특정시점 복구방법](https://mozi.tistory.com/560)
|
ae13aac57d6742c7822896930137b8a3
|
Postgre Kubernetes
|
Postgres Container Usages
|
Oct 6, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
| null |
### Postgre Kubernetes Productions
|Title|
|:-:|
|[Kubegres](https://texonom.com/kubegres-3dd755e8ed944f2399eaadc376de67e4)|
|[Stackgres](https://texonom.com/stackgres-7db67ff0397a424f83bf10c679ce5aca)|
|[Crunchdata](https://texonom.com/crunchdata-ea7818e760b54529ba19a7ec28219d76)|
> [PostgreSQL 14 on Kubernetes (with examples!)](https://blog.crunchydata.com/blog/postgresql-14-on-kubernetes)
|
f044a18214ae4dcc8c59f1bf7f4ed4f3
|
Crunchdata
|
Postgre Kubernetes Productions
|
Apr 2, 2022
|
Alan Jo
|
Alan Jo
|
Apr 2, 2022
| null |
### Crunchdata Usage
|Title|
|:-:|
https://github.com/CrunchyData/postgres-operator
|
ea7818e760b54529ba19a7ec28219d76
|
Kubegres
|
Postgre Kubernetes Productions
|
Oct 6, 2021
|
Alan Jo
|
Alan Jo
|
Oct 6, 2021
| null |
### Kubernetes operator allowing to deploy one or many clusters of Postgre
### Kubegres Usages
|Title|
|:-:|
> [GitHub - reactive-tech/kubegres: Kubegres is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql instances and manage databases replication, failover and backup.](https://github.com/reactive-tech/kubegres)
|
3dd755e8ed944f2399eaadc376de67e4
|
Stackgres
|
Postgre Kubernetes Productions
|
Oct 15, 2021
|
Alan Jo
|
Alan Jo
|
Oct 15, 2021
| null |
> [GitHub - ongres/stackgres: StackGres Operator, Full Stack PostgreSQL on Kubernetes // !! Mirror repository of https://gitlab.com/ongresinc/stackgres, only accept Merge Requests there.](https://github.com/ongres/stackgres/?utm_source=tldrnewsletter)
|
7db67ff0397a424f83bf10c679ce5aca
|
AppOS
|
Postgres Tools
|
Apr 29, 2021
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
> [[Pgday.Seoul 2019] AppOS 고성능 I/O 확장 모듈로 성능 10배 향상시키기](https://www.slideshare.net/pgday_seoul/pgdayseoul-2019-appos-io-10)
|
ef198b64216145e5af9f46f0dfc47005
|
|
gimbop
|
Postgres Tools
|
Jan 9, 2022
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
### msa viz connection
[gimbap](https://github.com/oslabs-beta/gimbap)
track endpoint performance
> [Untitled](https://www.gimbap.io/documentation)
|
88ae5223bc064edf880854514fd42210
|
|
PG Strom
|
Postgres Tools
|
Apr 29, 2021
|
Alan Jo
|
Alan Jo
|
May 8, 2023
|
Free for default version, muli GPU version need license
[PG Strom Install](https://texonom.com/pg-strom-install-05ce69bb23164298bbde1601139f8fcb)
> [linux7.6에 PostgreSQL 10 + PG-Strom 2.2 구성하기(성공)](https://positivemh.tistory.com/469)
> [heterodb/pg-strom](https://github.com/heterodb/pg-strom)
|
0f0cfe801d9c4c6393b8d54931bf54ee
|
|
pgbench
|
Postgres Tools
|
Oct 12, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
```typecreate database pgbenchtest```
```typepgbench -h app.stryx.co.kr -p 15432 -U stryx -i pgbenchtest```
```typepgbench -h app.stryx.co.kr -p 15432 -U stryx -d pgbenchtest```
> [pgbench를 통한 Postgresql 성능 분석](https://browndwarf.tistory.com/52)
|
5af710dd4b414914a43ebaab872e7b8a
|
|
**[pg_graphql](https://github.com/supabase/pg_graphql)**
|
Postgres Tools
|
Dec 6, 2021
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
## GraphQL support for PostgreSQL
- **Performant**: [+2k requests/second](https://supabase.github.io/pg_graphql/performance/)
- **Always up-to-date**: Reflected from the SQL schema
- **Pagination**: Relay compliant
- **Serverless**: Runs in your database with no *additional* server required
- **Open Source**: Apache License 2.0
```typegit clone https://github.com/supabase/pg_graphql.gitcd pg_graphql**docker-compose up**```
### Documentation
> [pg_graphql](https://supabase.github.io/pg_graphql/)
|
907a10ba62ae4fc28f99d12ff61e15fc
|
|
Postgres CLI
|
Postgres Tools
|
Mar 23, 2021
|
Alan Jo
|
Alan Jo
|
Apr 13, 2022
|
### Postgres CLIs
|Title|
|:-:|
|[pgcli](https://texonom.com/pgcli-e6ae4e9c661b46adb895f38bb4bd4114)|
|[psql](https://texonom.com/psql-c5a0d98b733a4950aa1cc92dc4b7444f)|
|[reshape](https://texonom.com/reshape-eac4c71b01344233a6a2c4ec888f4ff7)|
|[pg_dump](https://texonom.com/pgdump-2c85cd5d072149289b1df14b3db66687)|
|[pg_dumppall](https://texonom.com/pgdumppall-31a8e038fd8a4cb9aa7598e46cdc195a)|
|[pg_restore](https://texonom.com/pgrestore-1dab191f12554824922e59b216a4024b)|
|[.pgpass](https://texonom.com/pgpass-80a6540ae54f412896103d9df123d488)|
|
b43be7330e574f6288cc56f1a38d6cca
|
|
Postgres GUI
|
Postgres Tools
|
Jan 9, 2022
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
[Beekeeper Studio](https://texonom.com/beekeeper-studio-aad426db81ba4beabc80fd143d4d697a)
|
### Postgres GUIs
|Title|
|:-:|
|[Seeql](https://texonom.com/seeql-30fdf8a3768d473184d00f8a38ab6b28)|
|
03c7343744fd4e638a6a95ff74b9c7e6
|
Postgres Meta
|
Postgres Tools
|
Dec 6, 2021
|
Alan Jo
|
Alan Jo
|
May 8, 2023
|
[postgres-meta](https://github.com/supabase/postgres-meta)
|
29aca4891a974effa2c10caa08956a29
|
|
PostgreSQL connection pooler
|
Postgres Tools
|
Nov 15, 2021
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
TCP 기반이다보니 3-way handshaking이 자주 발생
### PostgreSQL connection poolers
|Title|
|:-:|
|[pg odyssey](https://texonom.com/pg-odyssey-f22968cc9cf44fb5936b5aedadbd24e9)|
|[PgBouncer](https://texonom.com/pgbouncer-ad749c0af43844a9aa16d570cac702b3)|
> [너의 나의 연결고리! DB Connection Pooler - PgBouncer](https://medium.com/deliverytechkorea/%EB%84%88%EC%9D%98-%EB%82%98%EC%9D%98-%EC%97%B0%EA%B2%B0%EA%B3%A0%EB%A6%AC-db-connection-pooler-pgbouncer-e43ec536a088)
|
15a39abc74044affb65a860ba4e24292
|
|
PostgREST
|
Postgres Tools
|
Dec 6, 2021
|
Alan Jo
|
Alan Jo
|
Jan 9, 2022
|
### Serve RESTful API from Postgres
### PostgREST Tools
|Title|
|:-:|
|[PostgREST](https://texonom.com/postgrest-d52ff6a69bf3465290cd4215f5bb98b8)|
> [PostgREST Documentation - PostgREST 8.0.0 documentation](https://postgrest.org/en/v9.0/)
|
cefd3885982c4fe7a950786c5b29c2f7
|
|
PG Strom Install
|
PG Strom
| null | null | null | null | null |
[PG Strom Debian Install](https://texonom.com/pg-strom-debian-install-ca3875412e5b4475a3d951af577bff5f)
[PG Strom Redhat Install](https://texonom.com/pg-strom-redhat-install-d88de97ab3eb4dc8938cef0eabf85fc6)
[PG Strom postgresql.conf](https://texonom.com/pg-strom-postgresqlconf-e313205918c5457d928083a48cec8aeb)
[PG Strom Check install](https://texonom.com/pg-strom-check-install-e864e5cd9f6e4a90a7ac182ac892e4cb)
### fatal error: `postgres.h`: No such file or directory
> [postgres.h: No such file or directory · Issue #158 · eulerto/wal2json](https://github.com/eulerto/wal2json/issues/158)
> [linux7.6에 PostgreSQL 10 + PG-Strom 2.2 구성하기(성공)](https://positivemh.tistory.com/469)
> [Install - PG-Strom Manual](http://heterodb.github.io/pg-strom/install/#checklist)
|
05ce69bb23164298bbde1601139f8fcb
|
PG Strom Check install
|
PG Strom Install
| null | null | null | null | null |
```typesudo service postgresql restart```
```type**create extension pg_strom;**```
```typenvidia-smi```
|
e864e5cd9f6e4a90a7ac182ac892e4cb
|
PG Strom Debian Install
|
PG Strom Install
| null | null | null | null | null |
It does not support nvme_strom yet
### Ubuntu 20
```typesudo apt install postgresql-server-dev-12 libpmem-dev clang-10 -ygit clone https://github.com/heterodb/pg-strom.git pgstromcd pgstrommakesudo make install```
|
ca3875412e5b4475a3d951af577bff5f
|
PG Strom postgresql.conf
|
PG Strom Install
| null | null | null | null | null |
```typeshared_preload_libraries = '$libdir/pg_strom'max_worker_processes = 100shared_buffers = 10GBwork_mem = 1GBlisten_addresses = '*'```
> [PostgreSQL 원격 접속 시 could not connect to server: Connection refused 에러 해결법](https://jupiny.com/2016/12/13/could-not-connect-to-server-connection-refused-when-remote-access-to-postgresql/)
|
e313205918c5457d928083a48cec8aeb
|
PG Strom Redhat Install
|
PG Strom Install
| null | null | null | null | null |
### postgre
```typesudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpmsudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpmsudo dnf -y module disable postgresqlsudo yum install -y postgresql10-server postgresql10-devel postgresql-contrib# pg stromsudo yum install -y https://heterodb.github.io/swdc/yum/rhel8-noarch/heterodb-swdc-1.1-1.el8.noarch.rpmsudo yum install pg_strom-PG10 -ysudo su - postgresinitdbpsql postgres postgres\password postgresexitexit# edit postgresql.confsystemctl start postgresql-10systemctl status -l postgresql-10systemctl enable postgresql-10```
pg strom 2.4.3만 되더라
### postgis
```type#enable power toolssudo nano /etc/yum.repos.d/CentOS-Linux-PowerTools.repo#enabled=1sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpmsudo yum install -y postgis25_10.x86_64# nvme stromsudo yum install https://heterodb.github.io/swdc/yum/rhel8-x86_64//nvme_strom-2.4-3.el8.x86_64.rpm```
- native postgis
> 
- pg strom added
> 
- pg strom + nvme strom
> 
> [How To Install and Use PostgreSQL on CentOS 8 | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-centos-8)
|
d88de97ab3eb4dc8938cef0eabf85fc6
|
pgcli
|
Postgres CLIs
|
Jun 27, 2022
|
Alan Jo
|
Alan Jo
|
Jun 27, 2022
|
### Postgres CLI with autocompletion and syntax highlighting
[pgcli](https://github.com/dbcli/pgcli)
|
e6ae4e9c661b46adb895f38bb4bd4114
|
|
pg_dump
|
Postgres CLIs
|
Jan 14, 2021
|
Alan Jo
|
Alan Jo
|
Nov 1, 2021
|
단일 Database를 요청한 Format으로 Bakup
```typepg_dump -d $db_name -h $pg_host -U $pg_user -f $file_path -v -p $port```
> [PostgreSQL DB Backup 및 Restore](https://browndwarf.tistory.com/12)
|
2c85cd5d072149289b1df14b3db66687
|
|
pg_dumppall
|
Postgres CLIs
|
Jan 14, 2021
|
Alan Jo
|
Alan Jo
|
Mar 23, 2021
|
체 Database Cluster를 SQL script로 Backup
|
31a8e038fd8a4cb9aa7598e46cdc195a
|
|
.pgpass
|
Postgres CLIs
|
Jan 14, 2021
|
Alan Jo
|
Alan Jo
|
Nov 1, 2021
|
### cli do not ask password like ssh
```typeecho hostname:port:database:username:password >> ~/.pgpasschmod 600 ~/.pgpass```
> [How to pass in password to pg_dump?](https://stackoverflow.com/questions/2893954/how-to-pass-in-password-to-pg-dump)
|
80a6540ae54f412896103d9df123d488
|
|
pg_restore
|
Postgres CLIs
|
Jan 14, 2021
|
Alan Jo
|
Alan Jo
|
Mar 23, 2021
|
1dab191f12554824922e59b216a4024b
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.