Weirdess when altering serial column type
От | Christopher Kings-Lynne |
---|---|
Тема | Weirdess when altering serial column type |
Дата | |
Msg-id | 42649372.50004@familyhealth.com.au обсуждение исходный текст |
Ответы |
Re: Weirdess when altering serial column type
|
Список | pgsql-hackers |
Should that sequence really stick around as an integer, numeric and text field??? test=# create table test (a serial); NOTICE: CREATE TABLE will create implicit sequence "test_a_seq" for serial column "test.a" NOTICE: CREATE TABLE will create implicit sequence "test_a_seq" for serial column "test.a" CREATE TABLE test=# \d test Table "public.test" Column | Type | Modifiers --------+---------+----------------------------------------------------- a | integer | not null default nextval('public.test_a_seq'::text) test=# alter table test alter a type integer; ALTER TABLE test=# \d test Table "public.test" Column | Type | Modifiers --------+---------+----------------------------------------------------- a | integer | not null default nextval('public.test_a_seq'::text) test=# alter table test alter a type numeric; ALTER TABLE test=# \d test Table "public.test" Column | Type | Modifiers --------+---------+----------------------------------------------------- a | numeric | not null default nextval('public.test_a_seq'::text) test=# alter table test alter a type text; ALTER TABLE test=# \d test Table "public.test" Column | Type | Modifiers --------+------+----------------------------------------------------- a | text | not null default nextval('public.test_a_seq'::text)
В списке pgsql-hackers по дате отправления: