tester=# selectoid,datnamefrompg_database;
oid|datname
-------+-----------
1| template1
12691| template0
12699|postgres
16384|pgsql
16386| tester
(5 rows)
oid|datname
-------+-----------
1| template1
12691| template0
12699|postgres
16384|pgsql
16386| tester
(5 rows)

本文展示了如何使用SQL查询从PostgreSQL数据库中检索数据库实例的信息。通过一个具体的例子,我们了解了如何列出当前存在的数据库及其对应的OID。
1153

被折叠的 条评论
为什么被折叠?



