Re: Storing a time interval

Поиск
Список
Период
Сортировка
От Pankaj Jangid
Тема Re: Storing a time interval
Дата
Msg-id m28sopqy5h.fsf@gmail.com
обсуждение исходный текст
Ответ на Re: Storing a time interval  (Steve Baldwin <steve.baldwin@gmail.com>)
Список pgsql-general
Steve Baldwin <steve.baldwin@gmail.com> writes:
> I agree with Michael. Another consideration is how the composite type is
> going to be handled in the DB layer of your processing code (e.g. node,
> python, ...).  In the scenario you described it seems unlikely you will be
> either having multiple columns of that type on your PO table, or using that
> composite type on a different table, so apart from the 'interest' factor,
> I'm not seeing any practical benefit.  Composite types are also slightly
> painful in the change they bring to the way you reference them. For example
> typically you need to surround the outer column in brackets - e.g.
> (dates).discount_last_date. If you are using an ORM library, does it know
> how to deal with that?
>

I faced a similar issue when using Enums with with rust lang. The Diesel
ORM didn't support it directly. Had to struggle with custom code in the
Model layer.

-- 
Pankaj Jangid



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

Предыдущее
От: Israel Brewster
Дата:
Сообщение: Merge sort/postgis performance tweaking?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: logical replication - negative bitmapset member not allowed