修改字段默认值
最近更新时间: 2025-02-18 16:02:00
postgres=# alter table tbase alter column age set default 0.0;
ALTER TABLE
postgres=# \d+ tbase
Table "public.tbase"
Column | Type | Modifiers | Storage | Stats target | Description
----------+------------------+------------------------------------------------+----------+--------------+-----------------
id | integer | not null default nextval('t_id_seq'::regclass) | plain | |
nickname | text | | extended | | TDSQL PG呢称是大象
age | double precision | default 0.0 | plain | |
Has OIDs: no
Distribute By SHARD(id)
Location Nodes: ALL DATANODES