Postgres JSON


## 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)







