pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Herwin Weststrate <herwin@quarantainenet.nl>
Cc: pgsql-general@postgresql.org
Subject: Re: Feature request: min/max for macaddr type
Date: Fri, 09 Mar 2018 11:54:06 -0500
Message-ID: <26876.1520614446@sss.pgh.pa.us> (raw)
In-Reply-To: <5f941094-8f6f-8bf3-5e48-3c72106d9ee2@quarantainenet.nl>
References: <5f941094-8f6f-8bf3-5e48-3c72106d9ee2@quarantainenet.nl>

Herwin Weststrate <herwin@quarantainenet.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@mail....

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




view thread (2+ messages)

Message-ID: <26876.1520614446@sss.pgh.pa.us>
Permalink:  ../26876.1520614446@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26876.1520614446@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, herwin@quarantainenet.nl
  Subject: Re: Feature request: min/max for macaddr type
  In-Reply-To: <26876.1520614446@sss.pgh.pa.us>
  References: <5f941094-8f6f-8bf3-5e48-3c72106d9ee2@quarantainenet.nl> <26876.1520614446@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox