Re: Range Types, constructors, and the type system

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: Range Types, constructors, and the type system
Дата
Msg-id 1FE22405-4DBA-408A-A785-31C405F36F54@phlo.org
обсуждение исходный текст
Ответ на Re: Range Types, constructors, and the type system  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Jul5, 2011, at 17:11 , Jeff Davis wrote:
> I'm OK with the intermediate type, but Florian seems skeptical of that
> idea.

I'm starting to get used to it, though ;-) I do now believe that it can
be made safe against accidental miss-use, it seem that I was overly
anxious there.

What I still don't like about it is that it feels like a workaround for
a feature missing in our type system - the possibility of having function
with a polymorphic return type, but no polymorphic arguments. I feel
somewhat strongly about this, because it bit me when I tried to implement
record_getfield() and record_setfield() to get and set a record's field
based on it's name.

However, placing the burden of solving that onto the range type patch
doesn't seem fair.

Plus, I've realized now that a RANGEINPUT type would allow us to easily
support some things that otherwise seem hard. We could, for example,
make the cast from RANGEINPUT to the individual range types an assignment
cast (or even implicit), thereby removing the need for an explicit
cast in a lot of common cases like insert into a table with a range column.

best regards,
Florian Pflug



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [BUGS] COPY .... WITH (FORMAT binary) causes syntax error at or near "binary"
Следующее
От: Robert Haas
Дата:
Сообщение: capturing regression test core dump