Postgresql怎么查询数据库中所有的表,odoo17数据库最依赖表整理

今天遇到了一个需求,需要梳理odoo中数据库表的分类,所以想要知道怎么查询当前数据库中所有的表,特此记录.

一个简单的SQL语句:

sql 复制代码
select * from pg_tables;

得到的结果如下:

显然这个有点杂乱,我们换一个SQL语句:

sql 复制代码
select tablename from pg_tables where schemaname='public'

不过我还想要根据表名升序,这样方便整理,所以加了个排序条件,SQL语句如下.

sql 复制代码
select tablename from pg_tables where schemaname='public' order by tablename;

这里顺便和大家分享一下,要把odoo跑起来,最少需要114张表,这些表的表名如下:

bash 复制代码
auth_totp_device
auth_totp_wizard
base_document_layout
base_enable_profiling_wizard
base_import_import
base_import_mapping
base_import_module
base_language_export
base_language_import
base_language_install
base_module_uninstall
base_module_update
base_module_upgrade
base_partner_merge_automatic_wizard
base_partner_merge_automatic_wizard_res_partner_rel
base_partner_merge_line
bus_bus
bus_presence
change_password_own
change_password_user
change_password_wizard
decimal_precision
iap_account
iap_account_info
iap_account_res_company_rel
ir_act_client
ir_act_report_xml
ir_act_server
ir_act_server_group_rel
ir_act_server_webhook_field_rel
ir_act_url
ir_act_window
ir_act_window_group_rel
ir_act_window_view
ir_actions
ir_actions_todo
ir_asset
ir_attachment
ir_config_parameter
ir_cron
ir_cron_trigger
ir_default
ir_demo
ir_demo_failure
ir_demo_failure_wizard
ir_exports
ir_exports_line
ir_filters
ir_logging
ir_mail_server
ir_model
ir_model_access
ir_model_constraint
ir_model_data
ir_model_fields
ir_model_fields_group_rel
ir_model_fields_selection
ir_model_inherit
ir_model_relation
ir_module_category
ir_module_module
ir_module_module_dependency
ir_module_module_exclusion
ir_profile
ir_property
ir_rule
ir_sequence
ir_sequence_date_range
ir_ui_menu
ir_ui_menu_group_rel
ir_ui_view
ir_ui_view_custom
ir_ui_view_group_rel
rel_modules_langexport
rel_server_actions
report_layout
report_paperformat
res_bank
res_company
res_company_users_rel
res_config
res_config_installer
res_config_settings
res_country
res_country_group
res_country_res_country_group_rel
res_country_state
res_currency
res_currency_rate
res_groups
res_groups_implied_rel
res_groups_report_rel
res_groups_users_rel
res_lang
res_lang_install_rel
res_partner
res_partner_bank
res_partner_category
res_partner_industry
res_partner_res_partner_category_rel
res_partner_title
res_users
res_users_apikeys
res_users_apikeys_description
res_users_deletion
res_users_identitycheck
res_users_log
res_users_settings
reset_view_arch_wizard
rule_group_rel
web_editor_converter_test
web_editor_converter_test_sub
web_tour_tour
wizard_ir_model_menu_create

跑起来之后的样子是这样的:

我用的是odoo17,这个版本在国内的资料还比较少,我后面有时间就分享一下. 不然坑太多了, 我看了很多技术文章, 踩了很多不必要的坑.

相关推荐
可爱の小公举17 分钟前
Redis技术体系全面解析
数据库·redis·缓存
一 乐24 分钟前
物业管理|基于SprinBoot+vue的智慧物业管理系统(源码+数据库+文档)
前端·javascript·数据库·vue.js·spring boot
孟意昶32 分钟前
Doris专题27-mysql兼容性与join连接
大数据·数据库·分布式·sql·mysql·doris
whn19771 小时前
Gbase 8A密码有效期剩余天数检查
数据库
煎蛋学姐1 小时前
SSM速到校园网上订餐网站5n2pv(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·用户管理·校园订餐系统·ssm 框架
西岭千秋雪_1 小时前
MySQL日志梳理(存储引擎层)
java·数据库·分布式·mysql·oracle
老华带你飞2 小时前
英语学习|基于Java英语学习系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot·后端·学习
思成不止于此2 小时前
MySQL 查询基础(一):列选择、算数运算与别名使用
数据库·笔记·sql·学习·oracle
蟹至之2 小时前
【MySQL】索引 (下) —— 索引的类型、创建索引、删除索引
数据库·mysql·索引
一 乐2 小时前
校园社区系统|基于java+vue的校园悬赏任务平台系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot