BUG #1437: converting column from text to int4 requires USING

Поиск
Список
Период
Сортировка
От Kim Hansen
Тема BUG #1437: converting column from text to int4 requires USING
Дата
Msg-id 200501240041.j0O0fAxr010949@developer.pgadmin.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1437
Logged by:          Kim Hansen
Email address:      k@oek.dk
PostgreSQL version: 8.0.0
Operating system:   Windows
Description:        converting column from text to int4 requires USING
Details:

When running the input below the 3rd line gives an error but the 4th line
works. I would expect that a::int4 was applyed by default and because of
that the USING shouldn't be nessesary.

== Input ==
CREATE TABLE test ( a text );
INSERT INTO test VALUES ( '1' );
ALTER TABLE test ALTER COLUMN a TYPE int4;
ALTER TABLE test ALTER COLUMN a TYPE int4 USING (a::int4);
DROP TABLE test;

== Output==
public=> \i bug.txt
CREATE TABLE
INSERT 25508 1
psql:bug.txt:3: ERROR:  column "a" cannot be cast to type "int4"
ALTER TABLE
DROP TABLE
public=>

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Florin Borsa"
Дата:
Сообщение: BUG #1436: not null condition is not respected
Следующее
От: Kim Hansen
Дата:
Сообщение: Re: BUG #1437: converting column from text to int4 requires USING