Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYpFm-002pIY-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Aug 2023 14:54:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qYpFk-00DfT9-Fm for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Aug 2023 14:54:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYpFk-00DfSx-5H for pgsql-hackers@lists.postgresql.org; Wed, 23 Aug 2023 14:54:35 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qYpFh-000Xet-Dp for pgsql-hackers@postgresql.org; Wed, 23 Aug 2023 14:54:34 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6bca5d6dcedso4381800a34.1 for ; Wed, 23 Aug 2023 07:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692802473; x=1693407273; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jfbfAAGpU2ON2T4wDEwIWCWIQRI4DC4u75n0Aey0Sq4=; b=BctJjgX95eoRcNZH7IYxB6rubA2eD+4/+22GOam+FjIGJ2oVmR1PEUbkix84NgQR2I AbfG20oGg0d43/QB0Cy7D0FY2M3Rfsjn3V4tHzKlDJktcKSbQiF3/o3I/Bj0AuTctt2u PRWsVONpXWvii3jq6qDmpDUB8RH+O9q1B4yCUhujBIYwHh3PDRxl0mpXzYhnNmya8JQr XAPatdKYHVpCoP1sJkixD7Df3P/h4wtHguwY6lZsk6J9+n+CTqLD8zVUH2TxGz40SW+I tebQM8FbmkAEo533HWxpQtMtI6joVo9F4ULP2g+YatefbKyGakciu1yf+69td2zsKXOJ u8VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692802473; x=1693407273; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jfbfAAGpU2ON2T4wDEwIWCWIQRI4DC4u75n0Aey0Sq4=; b=LOIj7uiqI6t1DOah05CqBEffnfixW49OillwoqpdgY1aWRYgg5h7XHkUZHSogBoGg7 oDIDVUwKcaMvJW1dmBNv1EMb0aDk6G00aM0rmcsNiDmiMC/VyjAhUSasmCqDOXls5CHk eutlQo1LZwKhofLgixb7imUQZH8KthHxpVntPoKjry1h1/1+CB3RI1wlAvAzQgK75VfC 1NlVXKQZ0T7dgzdJOyfUaP0lqHst4sb2GocXTMgSEtPj4NoR9hkLPhBNTlwToXO9WJxM cAy6P9sfUrwajSxa7unxzGlgG6jdIkf8q8hcixWNUZp9O+AFPCUTNBZ0gh3nErwgsRt+ 3lkw== X-Gm-Message-State: AOJu0YwkxEDlsRs0AHCYq8/kzq8JAdoIitUYffXDoCXc6P4TKvFa2DC3 t+XtMXHvwJ6Y9/GQmn1zZ09VNnQMTv0= X-Google-Smtp-Source: AGHT+IG+Tv1IgaCvWkQYKnqLOQW7akKZKE63tR3YsdGfojtyn/js/A1jrYmnCuGv1BdxZgyAiwvyNA== X-Received: by 2002:a05:6870:1810:b0:1b4:689b:209f with SMTP id t16-20020a056870181000b001b4689b209fmr14709888oaf.52.1692802472773; Wed, 23 Aug 2023 07:54:32 -0700 (PDT) Received: from nathanxps13 ([2600:1700:48f8:340f:4597:b71a:6a01:5284]) by smtp.gmail.com with ESMTPSA id dt26-20020a0568705a9a00b001c52b2bdb51sm7039899oab.37.2023.08.23.07.54.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 07:54:32 -0700 (PDT) Date: Wed, 23 Aug 2023 07:54:30 -0700 From: Nathan Bossart To: Peter Eisentraut Cc: Dean Rasheed , John Naylor , Kirk Wolak , Eric Radman , pgsql-hackers@postgresql.org Subject: Re: [PATCH] Add function to_oct Message-ID: <20230823145430.GA1014432@nathanxps13> References: <20230815171715.GA2312399@nathanxps13> <20230816142410.GA2651383@nathanxps13> <20230817152628.GA3148583@nathanxps13> <20230820152551.GB290672@nathanxps13> <0161f4fa-5cd4-ea9b-01a6-8b6b535bd812@eisentraut.org> <20230822142608.GA651404@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Aug 22, 2023 at 04:57:02PM +0200, Peter Eisentraut wrote: > On 22.08.23 16:26, Nathan Bossart wrote: >> > I don't understand the reason for this handling of negative values. I would >> > expect that, say, to_hex(-1234) would return '-' || to_hex(1234). >> For this patch set, I was trying to retain the current behavior, which is >> to return the two's complement representation. I'm open to changing this >> if there's agreement on what the output should be. > > Ah, if there is existing behavior then we should probably keep it. Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com