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  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Problem with PITR recovery
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Weirdess when altering serial column type