CREATE[UNIQUE]INDEX[CONCURRENTLY][[IFNOTEXISTS]name]ON[ONLY]table_name[USINGmethod]({column_name|(expression)}[COLLATEcollation][opclass[(opclass_parameter=value[,...])]][ASC|DESC][NULLS{FIRST|LAST}][,...])[INCLUDE(column_name[,...])][WITH(storage_parameter[=value][,...])][TABLESP...
您可以命名特定对象以获取更多信息。使用+运算符还将列出表的约束和索引。postgres=# \d+ example_tbl Table "public.example_tbl"Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description---+---+---+---+---+---+---+---+---id | ...
email | character varying(255) | not null | extended 76 | | is_active | boolean | not null | plain 8 | |falseIndexes:"table_name_pkey"PRIMARY KEY, btree (id) Foreign keys:"table_name_user_id_fkey"FOREIGN KEY (user_id) REFERENCES"users"(id) ON DELETE CASCADE ON UPDATE CASCADE Che...
security_barrier (boolean):#如果希望视图提供行级安全性,应该使用这个参数。 query:#提供视图的行和列的一个 SELECT 或者VALUES 命令。 WITH [ CASCADED | LOCAL ] CHECK OPTION:#这个选项控制自动可更新视图的行为。这个选项被指定时,将检查该视图上的 INSERT 和UPDATE 命令以确保新行满足视图的定义条件(也就...
对于用户配置Table、Column、Where的信息,PostgresqlReader将其拼接为SQL语句发送到PostgreSQL数据库;对于用户配置querySql信息,PostgresqlReader直接将其发送到PostgreSQL数据库。 3 功能说明 3.1 配置样例 以PostgresqlReader插件为例,配置一个从PostgreSQL数据库同步抽取数据到本地的作业: { "job": { "setting": { "spe...
relisshared | boolean | | not null | relpersistence | "char" | | not null | relkind | "char" | | not null | relnatts | smallint | | not null | relchecks | smallint | | not null | relhasoids | boolean | | not null | ...
Column | Type | Collation | Nullable | Default ---+---+---+---+--- id | integer | | | info | text | | | 1. 2. 3. 4. 5. 6. 7. 8. 列名也是同样如此: bill@bill=>create table test(Id int,INFO text); CREATE TABLE bill@bill=>select id,info from test...
Column | Type | Modifiers ---+---+--- id | integer | name | character varying(20) | gender | boolean | join_date | date | dept | character(4) | Indexes: "tbl_partition_201304_joindate" btree (join_date) Check constraints: "tbl_partition_201304_join_date_check...
一、pg_buffercache 主要作用是查看pg的共享池中缓存的对象信息 1.1 创建扩展postgres=# create extension pg_buffercache;CREATE EXTENSION 1.2 查看视图pg_buffercache postgres=# \d pg_buffercache View "public.pg_buffercache" Column | Type | Collation | Nullable | Default ---+---+...
布尔类型(boolean type) 用于表示true或false mydb=# \d test_bool; Table "public.test_bool" Column | Type | Collation | Nullable | Default ---+---+---+---+--- flag | boolean | | | remark | text | | | mydb=# insert into test_bool (flag, remark) values ('t', 'True'), ...