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.96) (envelope-from ) id 1w2atP-000QZ5-28 for pgsql-general@arkaria.postgresql.org; Tue, 17 Mar 2026 20:19:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2atO-004omF-1a for pgsql-general@arkaria.postgresql.org; Tue, 17 Mar 2026 20:19:54 +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.96) (envelope-from ) id 1w2atO-004om7-0V for pgsql-general@lists.postgresql.org; Tue, 17 Mar 2026 20:19:54 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2atK-00000000FFj-12gk for pgsql-general@postgresql.org; Tue, 17 Mar 2026 20:19:53 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id CF4CCEC01C6; Tue, 17 Mar 2026 16:19:50 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Tue, 17 Mar 2026 16:19:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1773778790; x=1773865190; bh=Y4ajbqLNyUTASvoo1PAvyUr/nsq92jBqVL/Fr3BRadY=; b= j+FZb0PaWjiBHcflLZzspjbt+ZH/WkonH6XN4epFkf6RhoA5mpVEBxtVHUKwVT9P XXdPcjTD65V/SNaklL5Z7QZCdwvyZrkYpQRfu0tWQTFV1kV6h51DuohjdYmhVvfb PhEITM/B3ZhO1rzVCCvKWHWmZKhmKdrvaYNMXFlocnvIIx2II6x6Vt4orD2+AK2l ta4sezDTFTbrFE56kS6KygpJ/x3RLfWpSVRuxRLwbmdlkTCJgw0PL4hwwCdwcfCq yWZlJetjzKepHrsXO26c1gQImv0TsHKDdHHCeIc9SM4JadXGXrMuxBuudPU20jp8 sTmdd4LJaFZm2bbtI1SgWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1773778790; x= 1773865190; bh=Y4ajbqLNyUTASvoo1PAvyUr/nsq92jBqVL/Fr3BRadY=; b=y dLhatBBzrKl5tadTYa6EBEPSQ+7egaRapUzpKfHYiUArpbOlr9F511j/hHrEg3Ha Y7nIlWaInfMQfqxNAtRxlz5XqTyhGQyW+NpJKFqqtz4wCPucxGRqXvtC1uqwVIMX LbVScj42SscxSYw1CdFFlZJHrCQfpjHjSAEyp3/+IsHyl8D7VBmVnVBR/W+k4H4o XlBU+F2B1lM/OH8DFuM0KqqqUueKa6jEsw0Mnq8/QXHCaKivbREScEadtJid3sql LFWf/xwe7x8op7MaOoXeaMcSZ9AgETVk7Jm9wPsHokn09rP+iSWFU9iEoX+01ifA qMbAfzUPqk5zDyCPJEl6Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeftddvudelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepfeegfeeiuedtgffgteeggfehkeejheetieeliefgteei keejvdeiveeigfehvedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepmhgrrhgtoh hssehfuddtrdgtohhmrdgsrhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehp ohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Mar 2026 16:19:50 -0400 (EDT) Message-ID: <114fe468-204a-43a9-8edc-26ffd6d598a4@aklaver.com> Date: Tue, 17 Mar 2026 13:19:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Trying to understand pg_get_expr() To: Marcos Pegoraro Cc: pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/17/26 1:08 PM, Marcos Pegoraro wrote: > Em ter., 17 de mar. de 2026 às 16:31, Adrian Klaver > > escreveu: > > Why does the = 'test' not return anything? > > > for me pg_get_expr(adbin, adrelid) returns 'test'::character varying > so it differs from 'test' I should have indicated I tried casting: SELECT adrelid::regclass, pg_typeof(pg_get_expr(adbin, adrelid)), pg_get_expr(adbin, adrelid) FROM pg_attrdef WHERE adrelid = 'default_test'::regclass AND pg_get_expr(adbin, 0) = 'test'::character varying; adrelid | pg_typeof | pg_get_expr ---------+-----------+------------- I also tried other combinations of casting both sides of "=" and it still did not work. > > regards > Marcos -- Adrian Klaver adrian.klaver@aklaver.com