interval->day AdjustIntervalForTypmod?

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема interval->day AdjustIntervalForTypmod?
Дата
Msg-id D96A7A51-3966-43AC-8FD8-2D950AA49883@myrealbox.com
обсуждение исходный текст
Ответы Re: interval->day AdjustIntervalForTypmod?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I've been making a bit of progress on adding a day field to the  
Interval struct (thanks to the help of this list and the find folks  
on IRC). Selects and basic math seem to be working, and the code is  
passing more regression tests than it was before.

I'm running into a bit of a problem with storing the data in  
relations. For example:

test=# select '1 year 13 mons 2 days 26:03'::interval;           interval
-------------------------------
2 years 1 mon 2 days 26:03:00
(1 row)

test=# create table interval_tbl (f1 interval);
CREATE TABLE
test=# insert into interval_tbl (f1) values ('1 year 13 mons 2 days  
26:03'::interval);
INSERT 0 1
test=# select * from interval_tbl;       f1
-----------------
2 days 26:03:00
(1 row)

It appears that the data isn't being stored properly. I think I need  
to make adjustments to AdjustIntervalForTypmod() in timestamp.c, but  
I could very easily be wrong. I'm unfamiliar with what this code is  
supposed to do and typmods in general. I've searched the mailing  
lists for hints but haven't found anything that has appeared  
particularly helpful. Would someone be able to give me a bit of  
background on typmod (and possibly related information) or suggest  
where I might find more information?

Thanks for any assistance.

Michael Glaesemann
grzm myrealbox com



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: autovacuum in backend?
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Re: pg_config --configure ...