簡體   English   中英

如何使用postgresql檢查表UNLOGGED?

[英]How to check table UNLOGGED with postgresql?

CREATE UNLOGGED TABLE IF NOT EXISTS <tablename>

如何首先檢查是否創建了所需的表UNLOGGED ,如果沒有相應地更改表?

postgres 9.4

您可以檢查表pg_classrelpersistence ;

postgres=# select relpersistence, relname from pg_class where relname like 'foo%';
┌────────────────┬─────────┐
│ relpersistence │ relname │
╞════════════════╪═════════╡
│ p              │ foo     │
│ p              │ foo1    │
│ u              │ foo2    │
└────────────────┴─────────┘
(3 rows)

foo2是未記錄的表。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM