From: | Kirk Wolak <wolakk(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Cc: | Eric Radman <ericshane(at)eradman(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Add function to_oct |
Date: | 2023-04-05 00:45:36 |
Message-ID: | CACLU5mQ9BGiMaTbS+EpvxngdEf35aX+Tcs31K8UJMkbxaZh5JA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 23, 2023 at 6:32 AM Peter Eisentraut <
peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
> On 20.12.22 23:08, Eric Radman wrote:
> > This patch is a new function based on the implementation of to_hex(int).
> >
> > Since support for octal integer literals was added, to_oct(int) allows
> > octal values to be easily stored and returned in query results.
> >
> > to_oct(0o755) = '755'
> >
> > This is probably most useful for storing file system permissions.
>
> Note this subsequent discussion about the to_hex function:
>
> https://www.postgresql.org/message-id/flat/CAEZATCVbkL1ynqpsKiTDpch34%3DSCr5nnau%3DnfNmiy2nM3SJHtw%40mail.gmail.com
>
> Also, I think there is no "to binary" function, so perhaps if we're
> going down this road one way or the other, we should probably complete
> the set.
>
> The code reads clearly. It works as expected (being an old PDP-11
guy!)... And the docs make sense and build as well.
Nothing larger than an int gets in. I was "missing" the bigint version,
but read through ALL of the messages to see (and agree)
That that's okay.
Marked Ready for Committer.
Thanks, Kirk
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-04-05 00:59:22 | Re: Track IO times in pg_stat_io |
Previous Message | Andres Freund | 2023-04-05 00:43:44 | Re: Minimal logical decoding on standbys |