BUG #1671: Long interval string representation rejected
| От | Mark Dilger |
|---|---|
| Тема | BUG #1671: Long interval string representation rejected |
| Дата | |
| Msg-id | 20050514010729.3E0F8F0B02@svr2.postgresql.org обсуждение |
| Ответы |
Re: BUG #1671: Long interval string representation rejected
|
| Список | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1671
Logged by: Mark Dilger
Email address: markdilger@yahoo.com
PostgreSQL version: 8.0.2
Operating system: Mandrake Linux 9.1 (2.4.21-0.13mdkenterprise #1 SMP)
Description: Long interval string representation rejected
Details:
<QUOTE>
bash-2.05b$ psql
Welcome to psql 8.0.2, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
mark=# select '4 millenniums 5 centuries 4 decades 1 year 4 months 4 days 17
minutes 31 seconds'::interval;
ERROR: invalid input syntax for type interval: "4 millenniums 5 centuries 4
decades 1 year 4 months 4 days 17 minutes 31 seconds"
mark=# select '4 millenniums 5 centuries 4 decades 1 year 4 months 4 days 17
minutes'::interval;
interval
-----------------------------------
4541 years 4 mons 4 days 00:17:00
(1 row)
</QUOTE>
It appears that any string representation of an interval of length greater
than 76 is rejected. (76 = 51 + 25 = MAXDATELEN + MAXDATEFIELDS). This
appears to be a limitation enforced within function interval_in() in the
file src/backend/utils/adt/timestamp.c
В списке pgsql-bugs по дате отправления: