PostgreSQL
文章平均质量分 53
PerpetualLearner
这个作者很懒,什么都没留下…
展开
-
(20210317Solved) Catch the IntegrityError about PostgreSQL in Python
Overview通过python api向postgresql存入数据出现重复数据,会报错IntegrityError,如何捕捉?Solution通过sqlalchemy使用Python API。The sqlalchemy wraps the psycopg2 exception to its own exception.from sqlalchemy.exc import IntegrityErrortry: ...except IntegrityError as e: ..原创 2021-03-29 10:30:26 · 188 阅读 · 0 评论 -
初识PostgreSQL常用命令
PostgreSQLPostgreSQL is a pwerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature roubustness, and performance.Object-Relational DatabaseAn objec..原创 2021-03-27 10:47:20 · 362 阅读 · 1 评论 -
(20210316已解决)docker-compose创建postgresql容器exited with code 1
Overview通过docker-compose创建postgresql容器总是失败,log显示为containerName exited with code 1Exit Code 1: Indicates failure due to application errorSolutiondocker-compose.yaml文件中添加environment变量:environment: POSTGRES_USER: example POSTGRES_PASSWORD: ..原创 2021-03-27 10:42:29 · 1768 阅读 · 0 评论 -
(20210316已解决)postgresql cannot execute CREATE TABLE in a read-only transation
Overview如题,在一个postgresql 的docker container里创建数据库出现上述错误。SolutionNormally the most plausible reasons for this kinde of error are:trying create statements on a read-only replica (the entire instance is read-only)<username> has default_transact..原创 2021-03-27 10:39:51 · 4143 阅读 · 0 评论 -
初识psycopg In Python on PostgreSQL
PostgreSQLPostgreSQL is a powerful, open source object-relational database system with over 30 year of active development that has earned it a strong reputation for reliability, feature robustness, and performance.psycopgPsycopg is the most popular..原创 2020-12-25 21:46:50 · 207 阅读 · 0 评论 -
初识PostgreSQL
PostgreSQLdocumentstutorialPostgreSQL WikiPostgreSQL also known as Postgres, is a free and open-source relational database management system(RDBMS) emphasizing extensilibilty and SQL compliance.PostgreSQL evolved from the Ingres project at the Uni..原创 2020-12-19 19:46:24 · 161 阅读 · 1 评论