From: Eric Radman <ericshane@eradman.com>
To: Ian Lawrence Barwick <barwick@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH] Add function to_oct
Date: Tue, 20 Dec 2022 20:42:10 -0500
Message-ID: <Y6JkciYiq4GqqEi4@vm3.eradman.com> (raw)
In-Reply-To: <CAB8KJ=ijh9iibwtB_5MQktUcZoe15FfNzAXNYUwnbxR7OKmHkQ@mail.gmail.com>
References: <Y6IyTQQ/TsD5wnsH@vm3.eradman.com>
<CAB8KJ=ijh9iibwtB_5MQktUcZoe15FfNzAXNYUwnbxR7OKmHkQ@mail.gmail.com>
On Wed, Dec 21, 2022 at 08:36:40AM +0900, Ian Lawrence Barwick wrote:
> 2022年12月21日(水) 7:08 Eric Radman <ericshane@eradman.com>:>
> > Hello!
> >
> > 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.
>
> Seems like it would be convenient to have. Any reason why there's
> no matching "to_oct(bigint)" version?
I couldn't think of a reason someone might want an octal
representation of a bigint. Certainly it would be easy to add
if there is value in supporting all of the same argument types.
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ericshane@eradman.com, barwick@gmail.com
Subject: Re: [PATCH] Add function to_oct
In-Reply-To: <Y6JkciYiq4GqqEi4@vm3.eradman.com>
* 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