Re: Feature request: min/max for macaddr type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Herwin Weststrate <herwin(at)quarantainenet(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Feature request: min/max for macaddr type
Date: 2018-03-09 16:54:06
Message-ID: 26876.1520614446@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Herwin Weststrate <herwin(at)quarantainenet(dot)nl> writes:
> ... I tried
> adding some functions for macaddr_smaller/macaddr_larger to implement
> the min/max. The code for it was very trivial, but then I got completely
> lost in pg_proc.h/pg_aggregate.h. I fail to find the documentation for
> this files as well, is there any reference I could use to finish my work?

Well, you'd need two pg_proc entries for macaddr_smaller/macaddr_larger,
and two more for the min and max aggregates, and then two pg_aggregate
entries as well. Looking at the existing entries related to some other
datatype (inet, perhaps) ought to let you move forward.

However, if you're thinking of submitting a patch ... it's too late
for any more feature submissions for v11, and I expect that by the
time v12 opens, the bootstrap data representation will have changed,
cf the discussion at
https://www.postgresql.org/message-id/flat/CAJVSVGWO48JbbwXkJz_yBFyGYW-M9YWxnPdxJBUosDC9ou_F0Q(at)mail(dot)gmail(dot)com

So, while you'll still need the same six new catalog entries, what
you actually have to write is going to look completely different.
You might want to stick this project on the back burner for a month
or so, until that dust settles.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Finzel 2018-03-09 18:34:04 Re: ERROR could not access transaction/Could not open file pg_commit_ts
Previous Message Jeremy Finzel 2018-03-09 16:43:20 ERROR could not access transaction/Could not open file pg_commit_ts