Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muclw-0004eU-5m for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Dec 2021 15:52:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muclv-0007TK-27 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Dec 2021 15:52:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muclu-0007TA-OC for pgsql-hackers@lists.postgresql.org; Tue, 07 Dec 2021 15:52:50 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mucls-0001YB-9H for pgsql-hackers@lists.postgresql.org; Tue, 07 Dec 2021 15:52:50 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id C67983201D90; Tue, 7 Dec 2021 10:52:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 07 Dec 2021 10:52:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=0fhbZs5Vv26HDz42zCb2ydljo3vgRmlOUL3p6YqXi oQ=; b=d1ZRofALDJDYRh2kIcQxZhFv24CvxYRAZE9weYyMW5DayZjtj+bEnJ88Q FVACY1gT2wDA0qDpJkYuOTDEONNDi9ExJlO1DSQSJ7j9j2Yzq0Vy6mgoqmqhBWX0 Jg4ee2ckRLsOMv3lDTeiybq5QpSEjPI9mOhfkNqALeAH4Rhtmn0Hk3CpyavRRbzD dPk6X04i7oxeBB+OWjVGTf0J0sIx44D4eD5cP8bdnrJ9fFv8JewCmMRMKIVCGnAs DtCXforHwmk9xjsJnENk82CfScsu5lIZoBfu0HotakvKGnJFvhJwqij+6Q6KOKKw Nm+GxFY85L6AuyQ/u140iOq4QjrKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrjeehgdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Dec 2021 10:52:43 -0500 (EST) Message-ID: Date: Tue, 7 Dec 2021 16:52:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: types reliant on encodings [was Re: Dubious usage of TYPCATEGORY_STRING] Content-Language: en-US To: Chapman Flack , Tom Lane , pgsql-hackers@lists.postgresql.org References: <2216388.1638480141@sss.pgh.pa.us> <61AA6516.8000406@anastigmatix.net> From: Peter Eisentraut In-Reply-To: <61AA6516.8000406@anastigmatix.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 03.12.21 19:42, Chapman Flack wrote: > Is there any way to find out, from the catalogs or in any automatable way, > which types are implemented with a dependence on the database encoding > (or on some encoding)? What is this needed for? C code can internally do whatever it wants, and the database encoding is effectively a constant, so there is no need for server-side code to be very much concerned about whether types do this. Also, "types" is perhaps the wrong subject here. Types only contain input and output functions and a few more bits. Additional functions operating on the type could look at the server encoding without the type and its core functions knowing about it.