From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | emre(at)hasegeli(dot)com |
Cc: | Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Redefining inet_net_ntop |
Date: | 2018-01-26 15:27:48 |
Message-ID: | 32437.1516980468@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Emre Hasegeli <emre(at)hasegeli(dot)com> writes:
>> port.h declares inet_net_ntop and we always compile our own from
>> port/inet_net_ntop.c .
> There is another copy of it under backend/utils/adt/inet_cidr_ntop.c.
> The code looks different but does 90% the same thing. Their naming
> and usage is confusing.
> I recently needed to format IP addresses as DNS PTR records in the
> database, and got annoyed by having no functions that outputs IPv6
> addresses in easily parseable format like
> 0000:0000:0000:0000:0000:0000:0000:0000. I was going to send a patch
> to unify those C functions and add another SQL function to get
> addresses in such format. Is this a good plan? Where should those C
> functions be on the tree if they are not port of anything anymore?
Almost certainly, the thing to do is absorb updated code from bind,
not roll our own.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2018-01-26 15:28:24 | Re: \describe* |
Previous Message | Tom Lane | 2018-01-26 15:21:33 | Re: Updating timezone data to 2018c |