interval typmodout is broken

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема interval typmodout is broken
Дата
Msg-id 20140924203114.GS5311@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответы Re: interval typmodout is broken  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I just noticed when working on DDL deparsing that the typmodout routine
for intervals is broken.  The code uses
if (precision != INTERVAL_FULL_PRECISION)    snprintf(res, 64, "%s(%d)", fieldstr, precision);else    snprintf(res, 64,
"%s",fieldstr);
 


which puts the parenthised number after the textual name; but the
grammar only takes it the other way around.

This has been wrong since commit 5725b9d9afc8 dated Dec 30 2006, which
introduced the whole notion of type-specific typmod output functions.
I don't understand how come nobody has noticed this in eight years.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: missing isinf declaration on solaris
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: RLS feature has been committed