BUG #4083: Return type of MAX and MIN of a VARCHAR column is TEXT

Поиск
Список
Период
Сортировка
От Pedro Gimeno
Тема BUG #4083: Return type of MAX and MIN of a VARCHAR column is TEXT
Дата
Msg-id 200804011639.m31GdGCx042756@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4083: Return type of MAX and MIN of a VARCHAR column is TEXT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4083
Logged by:          Pedro Gimeno
Email address:      pgsql-001@personal.formauri.es
PostgreSQL version: 8.2.5
Operating system:   Irrelevant
Description:        Return type of MAX and MIN of a VARCHAR column is TEXT
Details:

Example:

CREATE TABLE a (x VARCHAR(40));

INSERT INTO a (x) VALUES ("blah");

SELECT MAX(x),MIN(x) FROM a;

The last query's return types are both TEXT, which in Zeos are not treated
in the same way as varchar.

Since the queries are designed to work with multiple servers, the only
workaround we've found so far is to create aggregate functions MAX(varchar)
and MIN(varchar) that return varchar.

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

Предыдущее
От: "MARCO A GONZALEZ"
Дата:
Сообщение: BUG #4082: Fatal error, close server
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #4082: Fatal error, close server