public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Eric Radman <[email protected]>
To: [email protected]
Subject: Re: [PATCH] Add function to_oct
Date: Thu, 23 Feb 2023 12:32:42 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <Y6IyTQQ/[email protected]>
References: <Y6IyTQQ/[email protected]>

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%4...

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.







view thread (2+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [PATCH] Add function to_oct
  In-Reply-To: <[email protected]>

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

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