postgresql docker 安装和需要关注点

文章讨论了国产化背景下PostgreSQL在中国的发展,介绍了如何通过Docker安装PostgreSQL以及如何使用Navicat工具将MySQL数据迁移到PostgreSQL,同时提及了两者在数据结构和语法上的差异。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 关于

最近都在搞国产化信创,关于DB这块也来一波浪潮,很多国产化的数据库也是基于postgesql研发的。
PostgreSQL开源生态是国内数据库发展及应用的强大引擎,越来越多的国产数据库选择加入到PostgreSQL生态中,开枝散叶。

看下官网的介绍:
PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

There is a wealth of information to be found describing how to install and use PostgreSQL through the official documentation. The open source community provides many helpful places to become familiar with PostgreSQL, discover how it works, and find career opportunities. Learn more on how to engage with the community.

postgesql官网:https://www.postgresql.org/

嗯自己也研究下。

2. docker 安装pgsql

docker pull postgres:13.9

docker run -itd --name postgres --restart=always -e POSTGRES_USER=root -e POSTGRES_PASSWORD='xxxx'  -p 5432:5432  -v /var/run/docker.sock:/var/run/docker.sock  -v /home/docker_data/postgre_data/postgresql/data:/var/lib/postgresql/data   postgres:13.9

迁移mysql到pgsql

可以使用navicat工具,能够直接转化到postgesql数据库中,直接复制然后到处pgsql或者直接把mysql的DB表直接转化成pgsql的结构语句

对比mysql

数据结构变化
基础语法差异对比
默认值丢失问题default
自增id设置丢失
其他

外传

😜 原创不易,如若本文能够帮助到您的同学
🎉 支持我:关注我+点赞👍+收藏⭐️
📝 留言:探讨问题,看到立马回复
💬 格言:己所不欲勿施于人 扬帆起航、游历人生、永不言弃!🔥

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南巷Dong

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值