Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j9oZf-000773-GG for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 11:21:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j9oZe-0002fQ-6u for pgsql-general@arkaria.postgresql.org; Thu, 05 Mar 2020 11:21:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j9oZd-0002fJ-Pt for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 11:21:53 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j9oZb-0006VK-2q for pgsql-general@lists.postgresql.org; Thu, 05 Mar 2020 11:21:52 +0000 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mailbackend.panix.com (Postfix) with ESMTP id 48Y7cZ1zmDz1hfg; Thu, 5 Mar 2020 06:21:50 -0500 (EST) Received: by panix5.panix.com (Postfix, from userid 17622) id 48Y7cZ0jMszfYm; Thu, 5 Mar 2020 06:21:50 -0500 (EST) Date: Thu, 5 Mar 2020 06:21:49 -0500 From: stan To: Ravi Krishna Cc: pgsql-general@lists.postgresql.org Subject: Re: Determining the type of an obkect in plperl Message-ID: <20200305112149.GA10537@panix.com> References: <20200304232135.GA16468@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Editor: gVim List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Mar 05, 2020 at 12:27:12AM +0000, Ravi Krishna wrote: > > > > > how can I determine what the data type of the value element is? > > > perl has a ref function which can tell what type of object. > > https://perldoc.perl.org/functions/ref.html > > > > > -- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > Even checking gisnt teh _TD structure does not return a value: foreach my $key (sort keys %{$_TD->{old}}) { my $ref1 = ref $_TD->{old}->{$key}; my $ref2 = ref $_TD->{new}->{$key}; elog(NOTICE, "ref1 = $ref1 ref2 = $ref2" ); . . . Results in the following output: NOTICE: ref1 = ref2 = -- "They that would give up essential liberty for temporary safety deserve neither liberty nor safety." -- Benjamin Franklin