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 1qRdSW-002Rut-C6 for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Aug 2023 18:54:04 +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 1qRdSU-00G2cn-ME for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Aug 2023 18:54:03 +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 1qRdSU-00G2ce-Dr for pgsql-hackers@lists.postgresql.org; Thu, 03 Aug 2023 18:54:02 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qRdSS-000Mb1-C6 for pgsql-hackers@lists.postgresql.org; Thu, 03 Aug 2023 18:54:01 +0000 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-686ed1d2594so1125585b3a.2 for ; Thu, 03 Aug 2023 11:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691088839; x=1691693639; 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=fik+hfxOLr0ChMjSE3eE5aUn98pFJK5t6erAN+IVEqs=; b=j7Sxxj46phtRKn1BJXZUQSD/fY24qa77LQI4L2ylLCZftxblYIUUoH6I+i2TBCsGfk eYe4SsOyWM89Enx7va8U2qeo1KrD0aqA7nf5PhIrGmUBTkkVo8uwbGZtZB22N50gd46H LbzmvBU7LpFiZ4G2hZJRAWhm/jcP7SLERMfuBDe1x20HlTrD/8GvozRkcwT3U48sKHSD jCkglCsBrv0xsDZmwhJHGfeFI6VfpcPtc5ODWl1Uq2dzrYSt9vbSkamAHRHsA594zukr 2aJw/1Y0CgB64Y0oMXqtxBjufdzL4P3Io6iVnmFPU156HBoLa4lL5lth5NSy6uVLSVDI 8X7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691088839; x=1691693639; 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=fik+hfxOLr0ChMjSE3eE5aUn98pFJK5t6erAN+IVEqs=; b=FkgyEARUs0ydesC24yCGm/hvqatrhUliCgzRWeDiepjkTfTbHQsQvDyx82RF/4Y4Gh eFM2sLZyq9PxmypnVS/TgJwleyzqu3iDN9Qjc+Uj7uPTGzeTysyRZ+jYX9KwyDIVAlH5 nUd3yb/PwTreX8xUlMeVLxG2K+ijCviOMdybiPn3YR4foWvtivvTjdH+BBgheDqdTkuv rhSf5mNhDKK7ivY32f7u1LuOW9fqKTzBLx5JVjaCwjR2uJ747bJbFz31uwcEEsx2nC46 ffvCAyK+EJOwCA/r70bXrHjyN6jDNZeewWzNiAR++ESzRlnMjKEVPPZxd5RemZsVnlwh jNJg== X-Gm-Message-State: ABy/qLYJTjNuoaGgKIPaXwO36YSNi5uIRkO1C/pYl44pYTMytQKosgCi XrgwBYt8pJS+FZrx1TRwmqk= X-Google-Smtp-Source: APBJJlFyGO9U1ElTSt17Jn3TpyM+RtDA8HMURo4pBatNe6RhGPIrAah1UmPI+2396SK1tFq5MPf+QQ== X-Received: by 2002:a05:6a20:8e0e:b0:135:293b:9b14 with SMTP id y14-20020a056a208e0e00b00135293b9b14mr24862343pzj.55.1691088839349; Thu, 03 Aug 2023 11:53:59 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id j4-20020a635504000000b00563bee47a79sm170037pgb.80.2023.08.03.11.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 11:53:58 -0700 (PDT) Date: Thu, 3 Aug 2023 11:53:56 -0700 From: Nathan Bossart To: Dave Cramer Cc: Alvaro Herrera , PostgreSQL Hackers Subject: Re: Using defines for protocol characters Message-ID: <20230803185356.GA1144430@nathanxps13> References: <20230803175940.vf3os5y37c7vrbwl@alvherre.pgsql> 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 Thu, Aug 03, 2023 at 12:07:21PM -0600, Dave Cramer wrote: > On Thu, 3 Aug 2023 at 11:59, Alvaro Herrera wrote: >> I don't really like the name pattern you've chosen though; I think we >> need to have a common prefix in the defines. Maybe prepending PQMSG_ to >> each name would be enough. And maybe turn the _RESPONSE and _REQUEST >> suffixes you added into prefixes as well, so instead of PARSE_REQUEST >> you could make it PQMSG_REQ_PARSE, PQMSG_RESP_BIND_COMPLETE and so >> on. >> > That becomes trivial to do now that the names are defined. I presumed > someone would object to the names. > I'm fine with the names you propose, but I suggest we wait to see if anyone > objects. I'm okay with the proposed names as well. > + * src/include/protocol.h Could we put these definitions in an existing header such as src/include/libpq/pqcomm.h? I see that's where the authentication request codes live today. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com