Re: [PATCH] Add function to_oct

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Eric Radman <ericshane(at)eradman(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Add function to_oct
Date: 2022-12-20 23:36:40
Message-ID: CAB8KJ=ijh9iibwtB_5MQktUcZoe15FfNzAXNYUwnbxR7OKmHkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2022年12月21日(水) 7:08 Eric Radman <ericshane(at)eradman(dot)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?

Patch has been added to the next commitfest [1], thanks.

[1] https://commitfest.postgresql.org/41/4071/

Regards

Ian Barwick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2022-12-21 00:02:51 Re: Support logical replication of DDLs
Previous Message Tom Lane 2022-12-20 23:05:42 Re: Array initialisation notation in syscache.c