Re: [HACKERS] GSoC 2017

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [HACKERS] GSoC 2017
Дата
Msg-id CAM-w4HOmw9ZSzZorsvykPaCK7j2qtTJa9k5ithYFhzsqmrVn9Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-hackers
On 27 January 2017 at 14:52, Thomas Kellerer <spam_eater@gmx.net> wrote:
>
> I don't have the exact syntax at hand, but it's something like this:
>
> create distinct type customer_id_type as integer;
> create distinct type order_id_type as integer;
>
> create table customers (id customer_id_type primary key);
> create table orders (id order_id_type primary key, customer_id
> customer_id_type not null);

That seems like a useful thing but it's not exactly the same use case.

Measurements with units and currency amounts both have the property
that you are likely to want to have a single column that uses
different units for different rows. You can aggregate across them
without converting as long as you have an appropriate where clause or
group by clause -- GROUP BY units_of(debit_amount) for example.


-- 
greg



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] WIP: [[Parallel] Shared] Hash
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] COPY as a set returning function