Re: [HACKERS] GSoC 2017 - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [HACKERS] GSoC 2017
Date
Msg-id CAM-w4HOmw9ZSzZorsvykPaCK7j2qtTJa9k5ithYFhzsqmrVn9Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] GSoC 2017  (Thomas Kellerer <spam_eater@gmx.net>)
List 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 by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] WIP: [[Parallel] Shared] Hash
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] COPY as a set returning function