postgres 7.4.2: float(20) results in error msg, but should not since 7.4)

Поиск
Список
Период
Сортировка
От Mathias Picker
Тема postgres 7.4.2: float(20) results in error msg, but should not since 7.4)
Дата
Msg-id 406EB410.8070400@virtual-earth.de
обсуждение исходный текст
Ответы Re: postgres 7.4.2: float(20) results in error msg, but  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Re: postgres 7.4.2: float(20) results in error msg, but should not since 7.4)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
While trying to install the roundup issue tracking system I discovered
the following - faulty - behaviour:

My fresh postgres 7.4.2 install on a FreeBSD 5.2-CURRENT machine replies

"ERROR:  precision for FLOAT must be less than 16"

to

"create table otks (otk_key varchar(255),otk_value
varchar(255),otk_time             float(20));"


Now http://www.postgresql.org/docs/7.4/static/datatype.html#DATATYPE-FLOAT
says

"PostgreSQL accepts float(1) to float(24) as selecting the real type,
while float(25) to float(53) select double precision."

and

"Note:  Prior to PostgreSQL 7.4, the precision in float(p) was taken to
mean so many decimal digits. This has been corrected to match the SQL
standard, which specifies that the precision is measured in binary digits."

So it should work, I guess. Are there any switches to alter this
behaviour, or is this a bug??

Thanks, Mathias

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

Предыдущее
От: "Rajat Katyal"
Дата:
Сообщение: Problem in calling prepare statement from STORED PROCEDURE
Следующее
От: Janning Vygen
Дата:
Сообщение: Re: Checking FKs after COPY and disabled Triggers