postgres=# CREATE TABLE x ( postgres(# id SERIAL PRIMARY KEY, postgres(# content VARCHAR(255) DEFAULT NULL postgres(# ); NOTICE: CREATE TABLE will create implicit sequence "x_id_seq" for serial column "x.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "x_pkey" for table "x" CREATE TABLE postgres=# \d x Table "public.x" Column | Type | Modifiers ---------+------------------------+------------------------------------------------ id | integer | not null default nextval('x_id_seq'::regclass) content | character varying(255) | default NULL::character varying Indexes: "x_pkey" PRIMARY KEY, btree (id) postgres=# alter table x rename to y; ALTER TABLE postgres=# \d y Table "public.y" Column | Type | Modifiers ---------+------------------------+------------------------------------------------ id | integer | not null default nextval('x_id_seq'::regclass) content | character varying(255) | default NULL::character varying Indexes: "x_pkey" PRIMARY KEY, btree (id)